summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
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
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')
-rw-r--r--src/emu/emumem.cpp128
-rw-r--r--src/emu/emumem.h120
-rw-r--r--src/emu/emumem_aspace.cpp142
-rw-r--r--src/emu/emumem_hea.h12
-rw-r--r--src/emu/emumem_hedp.cpp638
-rw-r--r--src/emu/emumem_hedp.h16
-rw-r--r--src/emu/emumem_hedr.h52
-rw-r--r--src/emu/emumem_hedr.ipp100
-rw-r--r--src/emu/emumem_hedr0.cpp315
-rw-r--r--src/emu/emumem_hedr1.cpp312
-rw-r--r--src/emu/emumem_hedr2.cpp312
-rw-r--r--src/emu/emumem_hedr3.cpp312
-rw-r--r--src/emu/emumem_hedw.h52
-rw-r--r--src/emu/emumem_hedw.ipp100
-rw-r--r--src/emu/emumem_hedw0.cpp321
-rw-r--r--src/emu/emumem_hedw1.cpp312
-rw-r--r--src/emu/emumem_hedw2.cpp312
-rw-r--r--src/emu/emumem_hedw3.cpp312
-rw-r--r--src/emu/emumem_hem.cpp202
-rw-r--r--src/emu/emumem_hem.h16
-rw-r--r--src/emu/emumem_hep.cpp90
-rw-r--r--src/emu/emumem_hep.h24
-rw-r--r--src/emu/emumem_het.cpp96
-rw-r--r--src/emu/emumem_het.h16
-rw-r--r--src/emu/emumem_heu.cpp174
-rw-r--r--src/emu/emumem_heu.h22
-rw-r--r--src/emu/emumem_heun.cpp180
-rw-r--r--src/emu/emumem_heun.h16
-rw-r--r--src/emu/emumem_mud.cpp41
-rw-r--r--src/emu/emumem_mud.h2
-rw-r--r--src/emu/emumem_mview.cpp230
31 files changed, 1847 insertions, 3130 deletions
diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp
index 556972a342f..ea46dc6062a 100644
--- a/src/emu/emumem.cpp
+++ b/src/emu/emumem.cpp
@@ -97,182 +97,156 @@ void handler_entry::enumerate_references(handler_entry::reflist &refs) const
{
}
-template<int Width, int AddrShift, endianness_t Endian> const handler_entry_read<Width, AddrShift, Endian> *const *handler_entry_read<Width, AddrShift, Endian>::get_dispatch() const
+template<int Width, int AddrShift> const handler_entry_read<Width, AddrShift> *const *handler_entry_read<Width, AddrShift>::get_dispatch() const
{
fatalerror("get_dispatch called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<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 Width, int AddrShift> void handler_entry_read<Width, AddrShift>::populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift> *handler)
{
fatalerror("populate called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<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 Width, int AddrShift> void handler_entry_read<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)
{
fatalerror("populate called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<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 Width, int AddrShift> void handler_entry_read<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)
{
fatalerror("populate_mismatched called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<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 Width, int AddrShift> void handler_entry_read<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)
{
fatalerror("populate_mismatched called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<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 Width, int AddrShift> void handler_entry_read<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)
{
fatalerror("populate_passthrough called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<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 Width, int AddrShift> void handler_entry_read<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)
{
fatalerror("populate_passthrough called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<Width, AddrShift, Endian>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift, Endian> *&handler) const
+template<int Width, int AddrShift> void handler_entry_read<Width, AddrShift>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift> *&handler) const
{
fatalerror("lookup called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void *handler_entry_read<Width, AddrShift, Endian>::get_ptr(offs_t offset) const
+template<int Width, int AddrShift> void *handler_entry_read<Width, AddrShift>::get_ptr(offs_t offset) const
{
return nullptr;
}
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_read<Width, AddrShift, Endian> *handler_entry_read<Width, AddrShift, Endian>::dup()
+template<int Width, int AddrShift> handler_entry_read<Width, AddrShift> *handler_entry_read<Width, AddrShift>::dup()
{
ref();
return this;
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<Width, AddrShift, Endian>::detach(const std::unordered_set<handler_entry *> &handlers)
+template<int Width, int AddrShift> void handler_entry_read<Width, AddrShift>::detach(const std::unordered_set<handler_entry *> &handlers)
{
fatalerror("detach called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read<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 Width, int AddrShift> void handler_entry_read<Width, AddrShift>::init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_read<Width, AddrShift> **dispatch, handler_entry::range *ranges)
{
fatalerror("init_handlers called on non-view class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> const handler_entry_write<Width, AddrShift, Endian> *const *handler_entry_write<Width, AddrShift, Endian>::get_dispatch() const
+template<int Width, int AddrShift> const handler_entry_write<Width, AddrShift> *const *handler_entry_write<Width, AddrShift>::get_dispatch() const
{
fatalerror("get_dispatch called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<Width, AddrShift, Endian>::populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift, Endian> *handler)
+template<int Width, int AddrShift> void handler_entry_write<Width, AddrShift>::populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift> *handler)
{
fatalerror("populate called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<Width, AddrShift, Endian>::populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift, Endian> *handler)
+template<int Width, int AddrShift> void handler_entry_write<Width, AddrShift>::populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift> *handler)
{
fatalerror("populate called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<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 Width, int AddrShift> void handler_entry_write<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)
{
fatalerror("populate_mismatched called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<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 Width, int AddrShift> void handler_entry_write<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)
{
fatalerror("populate_mismatched called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<Width, AddrShift, Endian>::populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings)
+template<int Width, int AddrShift> void handler_entry_write<Width, AddrShift>::populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings)
{
fatalerror("populate_passthrough called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<Width, AddrShift, Endian>::populate_passthrough_mirror(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)
+template<int Width, int AddrShift> void handler_entry_write<Width, AddrShift>::populate_passthrough_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings)
{
fatalerror("populate_passthrough called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<Width, AddrShift, Endian>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift, Endian> *&handler) const
+template<int Width, int AddrShift> void handler_entry_write<Width, AddrShift>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift> *&handler) const
{
fatalerror("lookup called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void *handler_entry_write<Width, AddrShift, Endian>::get_ptr(offs_t offset) const
+template<int Width, int AddrShift> void *handler_entry_write<Width, AddrShift>::get_ptr(offs_t offset) const
{
return nullptr;
}
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_write<Width, AddrShift, Endian> *handler_entry_write<Width, AddrShift, Endian>::dup()
+template<int Width, int AddrShift> handler_entry_write<Width, AddrShift> *handler_entry_write<Width, AddrShift>::dup()
{
ref();
return this;
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<Width, AddrShift, Endian>::detach(const std::unordered_set<handler_entry *> &handlers)
+template<int Width, int AddrShift> void handler_entry_write<Width, AddrShift>::detach(const std::unordered_set<handler_entry *> &handlers)
{
fatalerror("detach called on non-dispatching class\n");
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write<Width, AddrShift, Endian>::init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift, Endian> **dispatch, handler_entry::range *ranges)
+template<int Width, int AddrShift> void handler_entry_write<Width, AddrShift>::init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift> **dispatch, handler_entry::range *ranges)
{
fatalerror("init_handlers called on non-view class\n");
}
-template class handler_entry_read<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read<0, 1>;
+template class handler_entry_read<0, 0>;
+template class handler_entry_read<1, 3>;
+template class handler_entry_read<1, 0>;
+template class handler_entry_read<1, -1>;
+template class handler_entry_read<2, 3>;
+template class handler_entry_read<2, 0>;
+template class handler_entry_read<2, -1>;
+template class handler_entry_read<2, -2>;
+template class handler_entry_read<3, 0>;
+template class handler_entry_read<3, -1>;
+template class handler_entry_read<3, -2>;
+template class handler_entry_read<3, -3>;
+
+template class handler_entry_write<0, 1>;
+template class handler_entry_write<0, 0>;
+template class handler_entry_write<1, 3>;
+template class handler_entry_write<1, 0>;
+template class handler_entry_write<1, -1>;
+template class handler_entry_write<2, 3>;
+template class handler_entry_write<2, 0>;
+template class handler_entry_write<2, -1>;
+template class handler_entry_write<2, -2>;
+template class handler_entry_write<3, 0>;
+template class handler_entry_write<3, -1>;
+template class handler_entry_write<3, -2>;
+template class handler_entry_write<3, -3>;
//**************************************************************************
// MEMORY MANAGER
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index 95a7c0d685e..b5deae3dd23 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -469,7 +469,7 @@ constexpr int handler_entry_dispatch_lowbits(int highbits, int width, int ashift
// ======================> memory_units_descritor forwards declaration
-template<int Width, int AddrShift, endianness_t Endian> class memory_units_descriptor;
+template<int Width, int AddrShift> class memory_units_descriptor;
@@ -558,9 +558,9 @@ protected:
// Provides the populate/read/get_ptr/lookup API
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_passthrough;
+template<int Width, int AddrShift> class handler_entry_read_passthrough;
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read : public handler_entry
+template<int Width, int AddrShift> class handler_entry_read : public handler_entry
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
@@ -568,8 +568,8 @@ public:
static constexpr u32 NATIVE_MASK = Width + AddrShift >= 0 ? make_bitmask<u32>(Width + AddrShift) : 0;
struct mapping {
- handler_entry_read<Width, AddrShift, Endian> *original;
- handler_entry_read<Width, AddrShift, Endian> *patched;
+ handler_entry_read<Width, AddrShift> *original;
+ handler_entry_read<Width, AddrShift> *patched;
u8 ukey;
};
@@ -578,9 +578,9 @@ public:
virtual uX read(offs_t offset, uX mem_mask) const = 0;
virtual void *get_ptr(offs_t offset) const;
- virtual void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift, Endian> *&handler) const;
+ virtual void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift> *&handler) const;
- inline void populate(offs_t start, offs_t end, offs_t mirror, handler_entry_read<Width, AddrShift, Endian> *handler) {
+ inline void populate(offs_t start, offs_t end, offs_t mirror, handler_entry_read<Width, AddrShift> *handler) {
start &= ~NATIVE_MASK;
end |= NATIVE_MASK;
if(mirror)
@@ -589,10 +589,10 @@ public:
populate_nomirror(start, end, start, end, handler);
}
- virtual void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift, Endian> *handler);
- virtual void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift, Endian> *handler);
+ virtual void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift> *handler);
+ virtual void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift> *handler);
- inline void populate_mismatched(offs_t start, offs_t end, offs_t mirror, const memory_units_descriptor<Width, AddrShift, Endian> &descriptor) {
+ inline void populate_mismatched(offs_t start, offs_t end, offs_t mirror, const memory_units_descriptor<Width, AddrShift> &descriptor) {
start &= ~NATIVE_MASK;
end |= NATIVE_MASK;
std::vector<mapping> mappings;
@@ -602,10 +602,10 @@ public:
populate_mismatched_nomirror(start, end, start, end, descriptor, START|END, mappings);
}
- virtual void 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);
- virtual void 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);
+ virtual void 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);
+ virtual void 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);
- inline void populate_passthrough(offs_t start, offs_t end, offs_t mirror, handler_entry_read_passthrough<Width, AddrShift, Endian> *handler) {
+ inline void populate_passthrough(offs_t start, offs_t end, offs_t mirror, handler_entry_read_passthrough<Width, AddrShift> *handler) {
start &= ~NATIVE_MASK;
end |= NATIVE_MASK;
std::vector<mapping> mappings;
@@ -615,26 +615,26 @@ public:
populate_passthrough_nomirror(start, end, start, end, handler, mappings);
}
- virtual void 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);
- virtual void 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);
+ virtual void 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);
+ virtual void 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);
// Remove a set of passthrough handlers, leaving the lower handler in their place
virtual void detach(const std::unordered_set<handler_entry *> &handlers);
// Return the internal structures of the root dispatch
- virtual const handler_entry_read<Width, AddrShift, Endian> *const *get_dispatch() const;
+ virtual const handler_entry_read<Width, AddrShift> *const *get_dispatch() const;
- virtual void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_read<Width, AddrShift, Endian> **dispatch, handler_entry::range *ranges);
- virtual handler_entry_read<Width, AddrShift, Endian> *dup();
+ virtual void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_read<Width, AddrShift> **dispatch, handler_entry::range *ranges);
+ virtual handler_entry_read<Width, AddrShift> *dup();
};
// =====================-> The parent class of all write handlers
// Provides the populate/write/get_ptr/lookup API
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_passthrough;
+template<int Width, int AddrShift> class handler_entry_write_passthrough;
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write : public handler_entry
+template<int Width, int AddrShift> class handler_entry_write : public handler_entry
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
@@ -642,8 +642,8 @@ public:
static constexpr u32 NATIVE_MASK = Width + AddrShift >= 0 ? make_bitmask<u32>(Width + AddrShift) : 0;
struct mapping {
- handler_entry_write<Width, AddrShift, Endian> *original;
- handler_entry_write<Width, AddrShift, Endian> *patched;
+ handler_entry_write<Width, AddrShift> *original;
+ handler_entry_write<Width, AddrShift> *patched;
u8 ukey;
};
@@ -652,9 +652,9 @@ public:
virtual void write(offs_t offset, uX data, uX mem_mask) const = 0;
virtual void *get_ptr(offs_t offset) const;
- virtual void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift, Endian> *&handler) const;
+ virtual void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift> *&handler) const;
- inline void populate(offs_t start, offs_t end, offs_t mirror, handler_entry_write<Width, AddrShift, Endian> *handler) {
+ inline void populate(offs_t start, offs_t end, offs_t mirror, handler_entry_write<Width, AddrShift> *handler) {
start &= ~NATIVE_MASK;
end |= NATIVE_MASK;
if(mirror)
@@ -663,10 +663,10 @@ public:
populate_nomirror(start, end, start, end, handler);
}
- virtual void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift, Endian> *handler);
- virtual void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift, Endian> *handler);
+ virtual void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift> *handler);
+ virtual void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift> *handler);
- inline void populate_mismatched(offs_t start, offs_t end, offs_t mirror, const memory_units_descriptor<Width, AddrShift, Endian> &descriptor) {
+ inline void populate_mismatched(offs_t start, offs_t end, offs_t mirror, const memory_units_descriptor<Width, AddrShift> &descriptor) {
start &= ~NATIVE_MASK;
end |= NATIVE_MASK;
@@ -677,10 +677,10 @@ public:
populate_mismatched_nomirror(start, end, start, end, descriptor, START|END, mappings);
}
- virtual void 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);
- virtual void 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);
+ virtual void 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);
+ virtual void 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);
- inline void populate_passthrough(offs_t start, offs_t end, offs_t mirror, handler_entry_write_passthrough<Width, AddrShift, Endian> *handler) {
+ inline void populate_passthrough(offs_t start, offs_t end, offs_t mirror, handler_entry_write_passthrough<Width, AddrShift> *handler) {
start &= ~NATIVE_MASK;
end |= NATIVE_MASK;
std::vector<mapping> mappings;
@@ -690,24 +690,24 @@ public:
populate_passthrough_nomirror(start, end, start, end, handler, mappings);
}
- virtual void populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings);
- virtual void populate_passthrough_mirror(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);
+ virtual void populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings);
+ virtual void populate_passthrough_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings);
// Remove a set of passthrough handlers, leaving the lower handler in their place
virtual void detach(const std::unordered_set<handler_entry *> &handlers);
// Return the internal structures of the root dispatch
- virtual const handler_entry_write<Width, AddrShift, Endian> *const *get_dispatch() const;
+ virtual const handler_entry_write<Width, AddrShift> *const *get_dispatch() const;
- virtual void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift, Endian> **dispatch, handler_entry::range *ranges);
- virtual handler_entry_write<Width, AddrShift, Endian> *dup();
+ virtual void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift> **dispatch, handler_entry::range *ranges);
+ virtual handler_entry_write<Width, AddrShift> *dup();
};
// =====================-> Passthrough handler management structure
class memory_passthrough_handler
{
- template<int Width, int AddrShift, endianness_t Endian> friend class handler_entry_read_passthrough;
- template<int Width, int AddrShift, endianness_t Endian> friend class handler_entry_write_passthrough;
+ template<int Width, int AddrShift> friend class handler_entry_read_passthrough;
+ template<int Width, int AddrShift> friend class handler_entry_write_passthrough;
public:
memory_passthrough_handler(address_space &space) : m_space(space) {}
@@ -724,8 +724,8 @@ private:
// =====================-> Forward declaration for address_space
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_unmapped;
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_unmapped;
+template<int Width, int AddrShift> class handler_entry_read_unmapped;
+template<int Width, int AddrShift> class handler_entry_write_unmapped;
// ======================> address offset -> byte offset
@@ -993,14 +993,14 @@ template<int Width, int AddrShift, endianness_t Endian, int TargetWidth, bool Al
// ======================> Direct dispatching
-template<int Level, int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX dispatch_read(offs_t mask, offs_t offset, typename emu::detail::handler_entry_size<Width>::uX mem_mask, const handler_entry_read<Width, AddrShift, Endian> *const *dispatch)
+template<int Level, int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX dispatch_read(offs_t mask, offs_t offset, typename emu::detail::handler_entry_size<Width>::uX mem_mask, const handler_entry_read<Width, AddrShift> *const *dispatch)
{
static constexpr u32 LowBits = emu::detail::handler_entry_dispatch_level_to_lowbits(Level, Width, AddrShift);
return dispatch[(offset & mask) >> LowBits]->read(offset, mem_mask);
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void dispatch_write(offs_t mask, offs_t offset, typename emu::detail::handler_entry_size<Width>::uX data, typename emu::detail::handler_entry_size<Width>::uX mem_mask, const handler_entry_write<Width, AddrShift, Endian> *const *dispatch)
+template<int Level, int Width, int AddrShift> void dispatch_write(offs_t mask, offs_t offset, typename emu::detail::handler_entry_size<Width>::uX data, typename emu::detail::handler_entry_size<Width>::uX mem_mask, const handler_entry_write<Width, AddrShift> *const *dispatch)
{
static constexpr u32 LowBits = emu::detail::handler_entry_dispatch_level_to_lowbits(Level, Width, AddrShift);
return dispatch[(offset & mask) >> LowBits]->write(offset, data, mem_mask);
@@ -1068,15 +1068,15 @@ private:
offs_t m_addrmask; // address mask
- const handler_entry_read<Width, AddrShift, Endian> *const *m_dispatch_read;
- const handler_entry_write<Width, AddrShift, Endian> *const *m_dispatch_write;
+ const handler_entry_read<Width, AddrShift> *const *m_dispatch_read;
+ const handler_entry_write<Width, AddrShift> *const *m_dispatch_write;
NativeType read_native(offs_t address, NativeType mask = ~NativeType(0)) {
- return dispatch_read<Level, Width, AddrShift, Endian>(offs_t(-1), address & m_addrmask, mask, m_dispatch_read);;
+ return dispatch_read<Level, Width, AddrShift>(offs_t(-1), address & m_addrmask, mask, m_dispatch_read);
}
void write_native(offs_t address, NativeType data, NativeType mask = ~NativeType(0)) {
- dispatch_write<Level, Width, AddrShift, Endian>(offs_t(-1), address & m_addrmask, data, mask, m_dispatch_write);;
+ dispatch_write<Level, Width, AddrShift>(offs_t(-1), address & m_addrmask, data, mask, m_dispatch_write);
}
void set(address_space *space, std::pair<const void *, const void *> rw);
@@ -1174,11 +1174,11 @@ private:
offs_t m_addrend_r; // maximum valid address for reading
offs_t m_addrstart_w; // minimum valid address for writing
offs_t m_addrend_w; // maximum valid address for writing
- handler_entry_read <Width, AddrShift, Endian> *m_cache_r; // read cache
- handler_entry_write<Width, AddrShift, Endian> *m_cache_w; // write cache
+ handler_entry_read <Width, AddrShift> *m_cache_r; // read cache
+ handler_entry_write<Width, AddrShift> *m_cache_w; // write cache
- handler_entry_read <Width, AddrShift, Endian> *m_root_read; // decode tree roots
- handler_entry_write<Width, AddrShift, Endian> *m_root_write;
+ handler_entry_read <Width, AddrShift> *m_root_read; // decode tree roots
+ handler_entry_write<Width, AddrShift> *m_root_write;
NativeType read_native(offs_t address, NativeType mask = ~NativeType(0));
void write_native(offs_t address, NativeType data, NativeType mask = ~NativeType(0));
@@ -1539,8 +1539,8 @@ class address_space : public address_space_installer
{
friend class memory_bank;
friend class memory_block;
- template<int Width, int AddrShift, endianness_t Endian> friend class handler_entry_read_unmapped;
- template<int Width, int AddrShift, endianness_t Endian> friend class handler_entry_write_unmapped;
+ template<int Width, int AddrShift> friend class handler_entry_read_unmapped;
+ template<int Width, int AddrShift> friend class handler_entry_write_unmapped;
struct notifier_t {
std::function<void (read_or_write)> m_notifier;
@@ -1653,8 +1653,8 @@ public:
void prepare_device_map(address_map &map);
void populate_from_map(address_map *map = nullptr);
- template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_unmapped <Width, AddrShift, Endian> *get_unmap_r() const { return static_cast<handler_entry_read_unmapped <Width, AddrShift, Endian> *>(m_unmap_r); }
- template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_unmapped<Width, AddrShift, Endian> *get_unmap_w() const { return static_cast<handler_entry_write_unmapped<Width, AddrShift, Endian> *>(m_unmap_w); }
+ template<int Width, int AddrShift> handler_entry_read_unmapped <Width, AddrShift> *get_unmap_r() const { return static_cast<handler_entry_read_unmapped <Width, AddrShift> *>(m_unmap_r); }
+ template<int Width, int AddrShift> handler_entry_write_unmapped<Width, AddrShift> *get_unmap_w() const { return static_cast<handler_entry_write_unmapped<Width, AddrShift> *>(m_unmap_w); }
handler_entry *unmap_r() const { return m_unmap_r; }
handler_entry *unmap_w() const { return m_unmap_w; }
@@ -1809,9 +1809,9 @@ private:
class memory_view
{
template<int Level, int Width, int AddrShift, endianness_t Endian> friend class address_space_specific;
- template<int Level, int Width, int AddrShift, endianness_t Endian> friend class memory_view_entry_specific;
- template<int HighBits, int Width, int AddrShift, endianness_t Endian> friend class handler_entry_write_dispatch;
- template<int HighBits, int Width, int AddrShift, endianness_t Endian> friend class handler_entry_read_dispatch;
+ template<int Level, int Width, int AddrShift> friend class memory_view_entry_specific;
+ template<int HighBits, int Width, int AddrShift> friend class handler_entry_write_dispatch;
+ template<int HighBits, int Width, int AddrShift> friend class handler_entry_read_dispatch;
friend class memory_view_entry;
friend class address_map_entry;
friend class address_map;
@@ -2030,8 +2030,8 @@ set(address_space *space, std::pair<const void *, const void *> rw)
{
m_space = space;
m_addrmask = space->addrmask();
- m_dispatch_read = (const handler_entry_read <Width, AddrShift, Endian> *const *)(rw.first);
- m_dispatch_write = (const handler_entry_write<Width, AddrShift, Endian> *const *)(rw.second);
+ m_dispatch_read = (const handler_entry_read <Width, AddrShift> *const *)(rw.first);
+ m_dispatch_write = (const handler_entry_write<Width, AddrShift> *const *)(rw.second);
}
@@ -2054,8 +2054,8 @@ set(address_space *space, std::pair<void *, void *> rw)
m_cache_w = nullptr;
}
});
- m_root_read = (handler_entry_read <Width, AddrShift, Endian> *)(rw.first);
- m_root_write = (handler_entry_write<Width, AddrShift, Endian> *)(rw.second);
+ m_root_read = (handler_entry_read <Width, AddrShift> *)(rw.first);
+ m_root_write = (handler_entry_write<Width, AddrShift> *)(rw.second);
// Protect against a wandering memset
m_addrstart_r = 1;
diff --git a/src/emu/emumem_aspace.cpp b/src/emu/emumem_aspace.cpp
index 931eb0a260d..18825442536 100644
--- a/src/emu/emumem_aspace.cpp
+++ b/src/emu/emumem_aspace.cpp
@@ -125,8 +125,8 @@ class address_space_specific : public address_space
static constexpr offs_t offset_to_byte(offs_t offset) { return AddrShift < 0 ? offset << iabs(AddrShift) : offset >> iabs(AddrShift); }
public:
- const handler_entry_read<Width, AddrShift, Endian> *const *m_dispatch_read;
- const handler_entry_write<Width, AddrShift, Endian> *const *m_dispatch_write;
+ const handler_entry_read<Width, AddrShift> *const *m_dispatch_read;
+ const handler_entry_write<Width, AddrShift> *const *m_dispatch_write;
std::string get_handler_string(read_or_write readorwrite, offs_t byteaddress) const override;
void dump_maps(std::vector<memory_entry> &read_map, std::vector<memory_entry> &write_map) const override;
@@ -300,46 +300,46 @@ public:
address_space_specific(memory_manager &manager, device_memory_interface &memory, int spacenum, int address_width)
: address_space(manager, memory, spacenum)
{
- m_unmap_r = new handler_entry_read_unmapped <Width, AddrShift, Endian>(this);
- m_unmap_w = new handler_entry_write_unmapped<Width, AddrShift, Endian>(this);
- m_nop_r = new handler_entry_read_nop <Width, AddrShift, Endian>(this);
- m_nop_w = new handler_entry_write_nop<Width, AddrShift, Endian>(this);
+ m_unmap_r = new handler_entry_read_unmapped <Width, AddrShift>(this);
+ m_unmap_w = new handler_entry_write_unmapped<Width, AddrShift>(this);
+ m_nop_r = new handler_entry_read_nop <Width, AddrShift>(this);
+ m_nop_w = new handler_entry_write_nop<Width, AddrShift>(this);
handler_entry::range r{ 0, 0xffffffff >> (32 - address_width) };
switch (address_width) {
- case 1: m_root_read = new handler_entry_read_dispatch< std::max(1, Width), Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< std::max(1, Width), Width, AddrShift, Endian>(this, r, nullptr); break;
- case 2: m_root_read = new handler_entry_read_dispatch< std::max(2, Width), Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< std::max(2, Width), Width, AddrShift, Endian>(this, r, nullptr); break;
- case 3: m_root_read = new handler_entry_read_dispatch< std::max(3, Width), Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< std::max(3, Width), Width, AddrShift, Endian>(this, r, nullptr); break;
- case 4: m_root_read = new handler_entry_read_dispatch< 4, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 4, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 5: m_root_read = new handler_entry_read_dispatch< 5, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 5, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 6: m_root_read = new handler_entry_read_dispatch< 6, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 6, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 7: m_root_read = new handler_entry_read_dispatch< 7, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 7, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 8: m_root_read = new handler_entry_read_dispatch< 8, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 8, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 9: m_root_read = new handler_entry_read_dispatch< 9, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 9, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 10: m_root_read = new handler_entry_read_dispatch<10, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<10, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 11: m_root_read = new handler_entry_read_dispatch<11, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<11, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 12: m_root_read = new handler_entry_read_dispatch<12, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<12, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 13: m_root_read = new handler_entry_read_dispatch<13, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<13, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 14: m_root_read = new handler_entry_read_dispatch<14, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<14, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 15: m_root_read = new handler_entry_read_dispatch<15, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<15, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 16: m_root_read = new handler_entry_read_dispatch<16, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<16, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 17: m_root_read = new handler_entry_read_dispatch<17, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<17, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 18: m_root_read = new handler_entry_read_dispatch<18, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<18, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 19: m_root_read = new handler_entry_read_dispatch<19, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<19, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 20: m_root_read = new handler_entry_read_dispatch<20, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<20, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 21: m_root_read = new handler_entry_read_dispatch<21, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<21, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 22: m_root_read = new handler_entry_read_dispatch<22, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<22, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 23: m_root_read = new handler_entry_read_dispatch<23, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<23, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 24: m_root_read = new handler_entry_read_dispatch<24, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<24, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 25: m_root_read = new handler_entry_read_dispatch<25, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<25, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 26: m_root_read = new handler_entry_read_dispatch<26, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<26, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 27: m_root_read = new handler_entry_read_dispatch<27, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<27, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 28: m_root_read = new handler_entry_read_dispatch<28, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<28, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 29: m_root_read = new handler_entry_read_dispatch<29, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<29, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 30: m_root_read = new handler_entry_read_dispatch<30, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<30, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 31: m_root_read = new handler_entry_read_dispatch<31, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<31, Width, AddrShift, Endian>(this, r, nullptr); break;
- case 32: m_root_read = new handler_entry_read_dispatch<32, Width, AddrShift, Endian>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<32, Width, AddrShift, Endian>(this, r, nullptr); break;
+ case 1: m_root_read = new handler_entry_read_dispatch< std::max(1, Width), Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< std::max(1, Width), Width, AddrShift>(this, r, nullptr); break;
+ case 2: m_root_read = new handler_entry_read_dispatch< std::max(2, Width), Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< std::max(2, Width), Width, AddrShift>(this, r, nullptr); break;
+ case 3: m_root_read = new handler_entry_read_dispatch< std::max(3, Width), Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< std::max(3, Width), Width, AddrShift>(this, r, nullptr); break;
+ case 4: m_root_read = new handler_entry_read_dispatch< 4, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 4, Width, AddrShift>(this, r, nullptr); break;
+ case 5: m_root_read = new handler_entry_read_dispatch< 5, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 5, Width, AddrShift>(this, r, nullptr); break;
+ case 6: m_root_read = new handler_entry_read_dispatch< 6, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 6, Width, AddrShift>(this, r, nullptr); break;
+ case 7: m_root_read = new handler_entry_read_dispatch< 7, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 7, Width, AddrShift>(this, r, nullptr); break;
+ case 8: m_root_read = new handler_entry_read_dispatch< 8, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 8, Width, AddrShift>(this, r, nullptr); break;
+ case 9: m_root_read = new handler_entry_read_dispatch< 9, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch< 9, Width, AddrShift>(this, r, nullptr); break;
+ case 10: m_root_read = new handler_entry_read_dispatch<10, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<10, Width, AddrShift>(this, r, nullptr); break;
+ case 11: m_root_read = new handler_entry_read_dispatch<11, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<11, Width, AddrShift>(this, r, nullptr); break;
+ case 12: m_root_read = new handler_entry_read_dispatch<12, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<12, Width, AddrShift>(this, r, nullptr); break;
+ case 13: m_root_read = new handler_entry_read_dispatch<13, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<13, Width, AddrShift>(this, r, nullptr); break;
+ case 14: m_root_read = new handler_entry_read_dispatch<14, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<14, Width, AddrShift>(this, r, nullptr); break;
+ case 15: m_root_read = new handler_entry_read_dispatch<15, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<15, Width, AddrShift>(this, r, nullptr); break;
+ case 16: m_root_read = new handler_entry_read_dispatch<16, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<16, Width, AddrShift>(this, r, nullptr); break;
+ case 17: m_root_read = new handler_entry_read_dispatch<17, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<17, Width, AddrShift>(this, r, nullptr); break;
+ case 18: m_root_read = new handler_entry_read_dispatch<18, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<18, Width, AddrShift>(this, r, nullptr); break;
+ case 19: m_root_read = new handler_entry_read_dispatch<19, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<19, Width, AddrShift>(this, r, nullptr); break;
+ case 20: m_root_read = new handler_entry_read_dispatch<20, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<20, Width, AddrShift>(this, r, nullptr); break;
+ case 21: m_root_read = new handler_entry_read_dispatch<21, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<21, Width, AddrShift>(this, r, nullptr); break;
+ case 22: m_root_read = new handler_entry_read_dispatch<22, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<22, Width, AddrShift>(this, r, nullptr); break;
+ case 23: m_root_read = new handler_entry_read_dispatch<23, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<23, Width, AddrShift>(this, r, nullptr); break;
+ case 24: m_root_read = new handler_entry_read_dispatch<24, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<24, Width, AddrShift>(this, r, nullptr); break;
+ case 25: m_root_read = new handler_entry_read_dispatch<25, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<25, Width, AddrShift>(this, r, nullptr); break;
+ case 26: m_root_read = new handler_entry_read_dispatch<26, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<26, Width, AddrShift>(this, r, nullptr); break;
+ case 27: m_root_read = new handler_entry_read_dispatch<27, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<27, Width, AddrShift>(this, r, nullptr); break;
+ case 28: m_root_read = new handler_entry_read_dispatch<28, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<28, Width, AddrShift>(this, r, nullptr); break;
+ case 29: m_root_read = new handler_entry_read_dispatch<29, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<29, Width, AddrShift>(this, r, nullptr); break;
+ case 30: m_root_read = new handler_entry_read_dispatch<30, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<30, Width, AddrShift>(this, r, nullptr); break;
+ case 31: m_root_read = new handler_entry_read_dispatch<31, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<31, Width, AddrShift>(this, r, nullptr); break;
+ case 32: m_root_read = new handler_entry_read_dispatch<32, Width, AddrShift>(this, r, nullptr); m_root_write = new handler_entry_write_dispatch<32, Width, AddrShift>(this, r, nullptr); break;
default: fatalerror("Unhandled address bus width %d\n", address_width);
}
@@ -425,25 +425,25 @@ public:
// native read
NativeType read_native(offs_t offset, NativeType mask)
{
- return dispatch_read<Level, Width, AddrShift, Endian>(offs_t(-1), offset & m_addrmask, mask, m_dispatch_read);
+ return dispatch_read<Level, Width, AddrShift>(offs_t(-1), offset & m_addrmask, mask, m_dispatch_read);
}
// mask-less native read
NativeType read_native(offs_t offset)
{
- return dispatch_read<Level, Width, AddrShift, Endian>(offs_t(-1), offset & m_addrmask, uX(0xffffffffffffffffU), m_dispatch_read);
+ return dispatch_read<Level, Width, AddrShift>(offs_t(-1), offset & m_addrmask, uX(0xffffffffffffffffU), m_dispatch_read);
}
// native write
void write_native(offs_t offset, NativeType data, NativeType mask)
{
- dispatch_write<Level, Width, AddrShift, Endian>(offs_t(-1), offset & m_addrmask, data, mask, m_dispatch_write);
+ dispatch_write<Level, Width, AddrShift>(offs_t(-1), offset & m_addrmask, data, mask, m_dispatch_write);
}
// mask-less native write
void write_native(offs_t offset, NativeType data)
{
- dispatch_write<Level, Width, AddrShift, Endian>(offs_t(-1), offset & m_addrmask, data, uX(0xffffffffffffffffU), m_dispatch_write);
+ dispatch_write<Level, Width, AddrShift>(offs_t(-1), offset & m_addrmask, data, uX(0xffffffffffffffffU), m_dispatch_write);
}
// virtual access to these functions
@@ -491,8 +491,8 @@ public:
static void write_qword_static(this_type &space, offs_t address, u64 data) { if (Width == 3) space.write_native(address & ~NATIVE_MASK, data); else memory_write_generic<Width, AddrShift, Endian, 3, false>([&space](offs_t offset, NativeType data, NativeType mask) { space.write_native(offset, data, mask); }, address, data, 0xffffffffffffffffU); }
static void write_qword_masked_static(this_type &space, offs_t address, u64 data, u64 mask) { memory_write_generic<Width, AddrShift, Endian, 3, false>([&space](offs_t offset, NativeType data, NativeType mask) { space.write_native(offset, data, mask); }, address, data, mask); }
- handler_entry_read <Width, AddrShift, Endian> *m_root_read;
- handler_entry_write<Width, AddrShift, Endian> *m_root_write;
+ handler_entry_read <Width, AddrShift> *m_root_read;
+ handler_entry_write<Width, AddrShift> *m_root_write;
std::unordered_set<handler_entry *> m_delayed_unrefs;
@@ -554,12 +554,12 @@ private:
check_optimize_all("install_read_handler", 8 << AccessWidth, addrstart, addrend, addrmask, addrmirror, addrselect, unitmask, cswidth, nstart, nend, nmask, nmirror, nunitmask, ncswidth);
if constexpr (Width == AccessWidth) {
- auto hand_r = new handler_entry_read_delegate<Width, AddrShift, Endian, READ>(this, handler_r);
+ auto hand_r = new handler_entry_read_delegate<Width, AddrShift, READ>(this, handler_r);
hand_r->set_address_info(nstart, nmask);
m_root_read->populate(nstart, nend, nmirror, hand_r);
} else {
- auto hand_r = new handler_entry_read_delegate<AccessWidth, -AccessWidth, Endian, READ>(this, handler_r);
- memory_units_descriptor<Width, AddrShift, Endian> descriptor(AccessWidth, Endian, hand_r, nstart, nend, nmask, nunitmask, ncswidth);
+ auto hand_r = new handler_entry_read_delegate<AccessWidth, -AccessWidth, READ>(this, handler_r);
+ memory_units_descriptor<Width, AddrShift> descriptor(AccessWidth, Endian, hand_r, nstart, nend, nmask, nunitmask, ncswidth);
hand_r->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
m_root_read->populate_mismatched(nstart, nend, nmirror, descriptor);
hand_r->unref();
@@ -587,12 +587,12 @@ private:
check_optimize_all("install_write_handler", 8 << AccessWidth, addrstart, addrend, addrmask, addrmirror, addrselect, unitmask, cswidth, nstart, nend, nmask, nmirror, nunitmask, ncswidth);
if constexpr (Width == AccessWidth) {
- auto hand_w = new handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>(this, handler_w);
+ auto hand_w = new handler_entry_write_delegate<Width, AddrShift, WRITE>(this, handler_w);
hand_w->set_address_info(nstart, nmask);
m_root_write->populate(nstart, nend, nmirror, hand_w);
} else {
- auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, Endian, WRITE>(this, handler_w);
- memory_units_descriptor<Width, AddrShift, Endian> descriptor(AccessWidth, Endian, hand_w, nstart, nend, nmask, nunitmask, ncswidth);
+ auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, WRITE>(this, handler_w);
+ memory_units_descriptor<Width, AddrShift> descriptor(AccessWidth, Endian, hand_w, nstart, nend, nmask, nunitmask, ncswidth);
hand_w->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
m_root_write->populate_mismatched(nstart, nend, nmirror, descriptor);
hand_w->unref();
@@ -621,21 +621,21 @@ private:
check_optimize_all("install_readwrite_handler", 8 << AccessWidth, addrstart, addrend, addrmask, addrmirror, addrselect, unitmask, cswidth, nstart, nend, nmask, nmirror, nunitmask, ncswidth);
if constexpr (Width == AccessWidth) {
- auto hand_r = new handler_entry_read_delegate <Width, AddrShift, Endian, READ>(this, handler_r);
+ auto hand_r = new handler_entry_read_delegate <Width, AddrShift, READ>(this, handler_r);
hand_r->set_address_info(nstart, nmask);
m_root_read ->populate(nstart, nend, nmirror, hand_r);
- auto hand_w = new handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>(this, handler_w);
+ auto hand_w = new handler_entry_write_delegate<Width, AddrShift, WRITE>(this, handler_w);
hand_w->set_address_info(nstart, nmask);
m_root_write->populate(nstart, nend, nmirror, hand_w);
} else {
- auto hand_r = new handler_entry_read_delegate <AccessWidth, -AccessWidth, Endian, READ>(this, handler_r);
- memory_units_descriptor<Width, AddrShift, Endian> descriptor(AccessWidth, Endian, hand_r, nstart, nend, nmask, nunitmask, ncswidth);
+ auto hand_r = new handler_entry_read_delegate <AccessWidth, -AccessWidth, READ>(this, handler_r);
+ memory_units_descriptor<Width, AddrShift> descriptor(AccessWidth, Endian, hand_r, nstart, nend, nmask, nunitmask, ncswidth);
hand_r->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
m_root_read ->populate_mismatched(nstart, nend, nmirror, descriptor);
hand_r->unref();
- auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, Endian, WRITE>(this, handler_w);
+ auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, WRITE>(this, handler_w);
descriptor.set_subunit_handler(hand_w);
hand_w->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
m_root_write->populate_mismatched(nstart, nend, nmirror, descriptor);
@@ -947,12 +947,12 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> std::string a
{
if (readorwrite == read_or_write::READ) {
offs_t start, end;
- handler_entry_read<Width, AddrShift, Endian> *handler;
+ handler_entry_read<Width, AddrShift> *handler;
m_root_read->lookup(address, start, end, handler);
return handler->name();
} else {
offs_t start, end;
- handler_entry_write<Width, AddrShift, Endian> *handler;
+ handler_entry_write<Width, AddrShift> *handler;
m_root_write->lookup(address, start, end, handler);
return handler->name();
}
@@ -988,14 +988,14 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
// read space
if (readorwrite == read_or_write::READ || readorwrite == read_or_write::READWRITE) {
- auto handler = static_cast<handler_entry_read<Width, AddrShift, Endian> *>(quiet ? m_nop_r : m_unmap_r);
+ auto handler = static_cast<handler_entry_read<Width, AddrShift> *>(quiet ? m_nop_r : m_unmap_r);
handler->ref();
m_root_read->populate(nstart, nend, nmirror, handler);
}
// write space
if (readorwrite == read_or_write::WRITE || readorwrite == read_or_write::READWRITE) {
- auto handler = static_cast<handler_entry_write<Width, AddrShift, Endian> *>(quiet ? m_nop_w : m_unmap_w);
+ auto handler = static_cast<handler_entry_write<Width, AddrShift> *>(quiet ? m_nop_w : m_unmap_w);
handler->ref();
m_root_write->populate(nstart, nend, nmirror, handler);
}
@@ -1012,8 +1012,8 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
check_optimize_mirror("install_view", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror);
auto handlers = view.make_handlers(*this, addrstart, addrend);
- m_root_read ->populate(nstart, nend, nmirror, static_cast<handler_entry_read <Width, AddrShift, Endian> *>(handlers.first));
- m_root_write->populate(nstart, nend, nmirror, static_cast<handler_entry_write<Width, AddrShift, Endian> *>(handlers.second));
+ m_root_read ->populate(nstart, nend, nmirror, static_cast<handler_entry_read <Width, AddrShift> *>(handlers.first));
+ m_root_write->populate(nstart, nend, nmirror, static_cast<handler_entry_write<Width, AddrShift> *>(handlers.second));
view.make_subdispatch(""); // Must be called after populate
}
@@ -1034,7 +1034,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
if (!mph)
mph = make_mph();
- auto handler = new handler_entry_read_tap<Width, AddrShift, Endian>(this, *mph, name, tap);
+ auto handler = new handler_entry_read_tap<Width, AddrShift>(this, *mph, name, tap);
m_root_read->populate_passthrough(nstart, nend, nmirror, handler);
handler->unref();
@@ -1054,7 +1054,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
if (!mph)
mph = make_mph();
- auto handler = new handler_entry_write_tap<Width, AddrShift, Endian>(this, *mph, name, tap);
+ auto handler = new handler_entry_write_tap<Width, AddrShift>(this, *mph, name, tap);
m_root_write->populate_passthrough(nstart, nend, nmirror, handler);
handler->unref();
@@ -1073,11 +1073,11 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
if (!mph)
mph = make_mph();
- auto rhandler = new handler_entry_read_tap <Width, AddrShift, Endian>(this, *mph, name, tapr);
+ auto rhandler = new handler_entry_read_tap <Width, AddrShift>(this, *mph, name, tapr);
m_root_read ->populate_passthrough(nstart, nend, nmirror, rhandler);
rhandler->unref();
- auto whandler = new handler_entry_write_tap<Width, AddrShift, Endian>(this, *mph, name, tapw);
+ auto whandler = new handler_entry_write_tap<Width, AddrShift>(this, *mph, name, tapw);
m_root_write->populate_passthrough(nstart, nend, nmirror, whandler);
whandler->unref();
@@ -1130,7 +1130,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
throw emu_fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, m_name, m_device.tag());
// map the range and set the ioport
- auto hand_r = new handler_entry_read_ioport<Width, AddrShift, Endian>(this, port);
+ auto hand_r = new handler_entry_read_ioport<Width, AddrShift>(this, port);
m_root_read->populate(nstart, nend, nmirror, hand_r);
}
@@ -1142,7 +1142,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, m_name, m_device.tag());
// map the range and set the ioport
- auto hand_w = new handler_entry_write_ioport<Width, AddrShift, Endian>(this, port);
+ auto hand_w = new handler_entry_write_ioport<Width, AddrShift>(this, port);
m_root_write->populate(nstart, nend, nmirror, hand_w);
}
@@ -1168,7 +1168,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
// map the read bank
if (rbank != nullptr)
{
- auto hand_r = new handler_entry_read_memory_bank<Width, AddrShift, Endian>(this, *rbank);
+ auto hand_r = new handler_entry_read_memory_bank<Width, AddrShift>(this, *rbank);
hand_r->set_address_info(nstart, nmask);
m_root_read->populate(nstart, nend, nmirror, hand_r);
}
@@ -1176,7 +1176,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
// map the write bank
if (wbank != nullptr)
{
- auto hand_w = new handler_entry_write_memory_bank<Width, AddrShift, Endian>(this, *wbank);
+ auto hand_w = new handler_entry_write_memory_bank<Width, AddrShift>(this, *wbank);
hand_w->set_address_info(nstart, nmask);
m_root_write->populate(nstart, nend, nmirror, hand_w);
}
@@ -1204,7 +1204,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
// map for read
if (readorwrite == read_or_write::READ || readorwrite == read_or_write::READWRITE)
{
- auto hand_r = new handler_entry_read_memory<Width, AddrShift, Endian>(this, baseptr);
+ auto hand_r = new handler_entry_read_memory<Width, AddrShift>(this, baseptr);
hand_r->set_address_info(nstart, nmask);
m_root_read->populate(nstart, nend, nmirror, hand_r);
}
@@ -1212,7 +1212,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void address_
// map for write
if (readorwrite == read_or_write::WRITE || readorwrite == read_or_write::READWRITE)
{
- auto hand_w = new handler_entry_write_memory<Width, AddrShift, Endian>(this, baseptr);
+ auto hand_w = new handler_entry_write_memory<Width, AddrShift>(this, baseptr);
hand_w->set_address_info(nstart, nmask);
m_root_write->populate(nstart, nend, nmirror, hand_w);
}
diff --git a/src/emu/emumem_hea.h b/src/emu/emumem_hea.h
index d7120ea0fd8..e8308a73960 100644
--- a/src/emu/emumem_hea.h
+++ b/src/emu/emumem_hea.h
@@ -5,16 +5,16 @@
// parent class for final handlers which want an address base and a mask
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_address : public handler_entry_read<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_address : public handler_entry_read<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- handler_entry_read_address(address_space *space, u32 flags) : handler_entry_read<Width, AddrShift, Endian>(space, flags) {}
+ handler_entry_read_address(address_space *space, u32 flags) : handler_entry_read<Width, AddrShift>(space, flags) {}
~handler_entry_read_address() = default;
inline void set_address_info(offs_t base, offs_t mask) {
- m_address_base = base & ~handler_entry_read<Width, AddrShift, Endian>::NATIVE_MASK;
+ m_address_base = base & ~handler_entry_read<Width, AddrShift>::NATIVE_MASK;
m_address_mask = mask;
}
@@ -22,18 +22,18 @@ protected:
offs_t m_address_base, m_address_mask;
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_address : public handler_entry_write<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_address : public handler_entry_write<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
static constexpr u32 NATIVE_MASK = Width + AddrShift >= 0 ? (1 << (Width + AddrShift)) - 1 : 0;
- handler_entry_write_address(address_space *space, u32 flags) : handler_entry_write<Width, AddrShift, Endian>(space, flags) {}
+ handler_entry_write_address(address_space *space, u32 flags) : handler_entry_write<Width, AddrShift>(space, flags) {}
~handler_entry_write_address() = default;
inline void set_address_info(offs_t base, offs_t mask) {
- m_address_base = base & ~handler_entry_write<Width, AddrShift, Endian>::NATIVE_MASK;
+ m_address_base = base & ~handler_entry_write<Width, AddrShift>::NATIVE_MASK;
m_address_mask = mask;
}
diff --git a/src/emu/emumem_hedp.cpp b/src/emu/emumem_hedp.cpp
index 9f77b8b3517..6f6cfea70b1 100644
--- a/src/emu/emumem_hedp.cpp
+++ b/src/emu/emumem_hedp.cpp
@@ -5,142 +5,142 @@
#include "emumem_hea.h"
#include "emumem_hedp.h"
-template<int Width, int AddrShift, endianness_t Endian, typename READ> template<typename R>
+template<int Width, int AddrShift, typename READ> template<typename R>
std::enable_if_t<std::is_same<R, read8_delegate>::value ||
std::is_same<R, read16_delegate>::value ||
std::is_same<R, read32_delegate>::value ||
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
+ typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, READ>::read_impl(offs_t offset, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename READ> template<typename R>
std::enable_if_t<std::is_same<R, read8m_delegate>::value ||
std::is_same<R, read16m_delegate>::value ||
std::is_same<R, read32m_delegate>::value ||
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
+ typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, READ>::read_impl(offs_t offset, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename READ> template<typename R>
std::enable_if_t<std::is_same<R, read8s_delegate>::value ||
std::is_same<R, read16s_delegate>::value ||
std::is_same<R, read32s_delegate>::value ||
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
+ typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, READ>::read_impl(offs_t offset, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename READ> template<typename R>
std::enable_if_t<std::is_same<R, read8sm_delegate>::value ||
std::is_same<R, read16sm_delegate>::value ||
std::is_same<R, read32sm_delegate>::value ||
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
+ typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, READ>::read_impl(offs_t offset, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename READ> template<typename R>
std::enable_if_t<std::is_same<R, read8mo_delegate>::value ||
std::is_same<R, read16mo_delegate>::value ||
std::is_same<R, read32mo_delegate>::value ||
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
+ typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, READ>::read_impl(offs_t offset, uX mem_mask) const
{
return m_delegate(*this->m_space);
}
-template<int Width, int AddrShift, endianness_t Endian, typename READ> template<typename R>
+template<int Width, int AddrShift, typename READ> template<typename R>
std::enable_if_t<std::is_same<R, read8smo_delegate>::value ||
std::is_same<R, read16smo_delegate>::value ||
std::is_same<R, read32smo_delegate>::value ||
std::is_same<R, read64smo_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
+ typename emu::detail::handler_entry_size<Width>::uX> handler_entry_read_delegate<Width, AddrShift, READ>::read_impl(offs_t offset, uX mem_mask) const
{
return m_delegate();
}
-template<int Width, int AddrShift, endianness_t Endian, typename READ> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_delegate<Width, AddrShift, Endian, READ>::read(offs_t offset, uX mem_mask) const
+template<int Width, int AddrShift, typename READ> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_delegate<Width, AddrShift, READ>::read(offs_t offset, uX mem_mask) const
{
return read_impl<READ>(offset, mem_mask);
}
-template<int Width, int AddrShift, endianness_t Endian, typename READ> std::string handler_entry_read_delegate<Width, AddrShift, Endian, READ>::name() const
+template<int Width, int AddrShift, typename READ> std::string handler_entry_read_delegate<Width, AddrShift, READ>::name() const
{
return m_delegate.name();
}
-template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template<typename W>
+template<int Width, int AddrShift, typename WRITE> template<typename W>
std::enable_if_t<std::is_same<W, write8_delegate>::value ||
std::is_same<W, write16_delegate>::value ||
std::is_same<W, write32_delegate>::value ||
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
+ void> handler_entry_write_delegate<Width, AddrShift, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename WRITE> template<typename W>
std::enable_if_t<std::is_same<W, write8m_delegate>::value ||
std::is_same<W, write16m_delegate>::value ||
std::is_same<W, write32m_delegate>::value ||
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
+ void> handler_entry_write_delegate<Width, AddrShift, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename WRITE> template<typename W>
std::enable_if_t<std::is_same<W, write8s_delegate>::value ||
std::is_same<W, write16s_delegate>::value ||
std::is_same<W, write32s_delegate>::value ||
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
+ void> handler_entry_write_delegate<Width, AddrShift, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename WRITE> template<typename W>
std::enable_if_t<std::is_same<W, write8sm_delegate>::value ||
std::is_same<W, write16sm_delegate>::value ||
std::is_same<W, write32sm_delegate>::value ||
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
+ void> handler_entry_write_delegate<Width, AddrShift, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
{
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>
+template<int Width, int AddrShift, typename WRITE> template<typename W>
std::enable_if_t<std::is_same<W, write8mo_delegate>::value ||
std::is_same<W, write16mo_delegate>::value ||
std::is_same<W, write32mo_delegate>::value ||
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
+ void> handler_entry_write_delegate<Width, AddrShift, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
{
m_delegate(*this->m_space, data);
}
-template<int Width, int AddrShift, endianness_t Endian, typename WRITE> template<typename W>
+template<int Width, int AddrShift, typename WRITE> template<typename W>
std::enable_if_t<std::is_same<W, write8smo_delegate>::value ||
std::is_same<W, write16smo_delegate>::value ||
std::is_same<W, write32smo_delegate>::value ||
std::is_same<W, write64smo_delegate>::value,
- void> handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
+ void> handler_entry_write_delegate<Width, AddrShift, WRITE>::write_impl(offs_t offset, uX data, uX mem_mask) const
{
m_delegate(data);
}
-template<int Width, int AddrShift, endianness_t Endian, typename WRITE> void handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::write(offs_t offset, uX data, uX mem_mask) const
+template<int Width, int AddrShift, typename WRITE> void handler_entry_write_delegate<Width, AddrShift, WRITE>::write(offs_t offset, uX data, uX mem_mask) const
{
write_impl<WRITE>(offset, data, mem_mask);
}
-template<int Width, int AddrShift, endianness_t Endian, typename WRITE> std::string handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>::name() const
+template<int Width, int AddrShift, typename WRITE> std::string handler_entry_write_delegate<Width, AddrShift, WRITE>::name() const
{
return m_delegate.name();
}
@@ -148,403 +148,221 @@ template<int Width, int AddrShift, endianness_t Endian, typename WRITE> std::str
-template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_ioport<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_ioport<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
return m_port->read();
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_ioport<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_read_ioport<Width, AddrShift>::name() const
{
return m_port->tag();
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_ioport<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
+template<int Width, int AddrShift> void handler_entry_write_ioport<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
m_port->write(data, mem_mask);
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_ioport<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_write_ioport<Width, AddrShift>::name() const
{
return m_port->tag();
}
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_LITTLE, read8_delegate>;
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_BIG, read8_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_LITTLE, read8_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_BIG, read8_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_LITTLE, read16_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_BIG, read16_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_LITTLE, read16_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_BIG, read16_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_LITTLE, read16_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_BIG, read16_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_LITTLE, read32_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_BIG, read32_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_LITTLE, read32_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_BIG, read32_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_LITTLE, read32_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_BIG, read32_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_LITTLE, read32_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_BIG, read32_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_LITTLE, read64_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_BIG, read64_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_LITTLE, read64_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_BIG, read64_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_LITTLE, read64_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_BIG, read64_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_LITTLE, read64_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_BIG, read64_delegate>;
-
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_LITTLE, read8m_delegate>;
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_BIG, read8m_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_LITTLE, read8m_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_BIG, read8m_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_LITTLE, read16m_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_BIG, read16m_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_LITTLE, read16m_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_BIG, read16m_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_LITTLE, read16m_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_BIG, read16m_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_LITTLE, read32m_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_BIG, read32m_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_LITTLE, read32m_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_BIG, read32m_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_LITTLE, read32m_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_BIG, read32m_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_LITTLE, read32m_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_BIG, read32m_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_LITTLE, read64m_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_BIG, read64m_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_LITTLE, read64m_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_BIG, read64m_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_LITTLE, read64m_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_BIG, read64m_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_LITTLE, read64m_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_BIG, read64m_delegate>;
-
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_LITTLE, read8s_delegate>;
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_BIG, read8s_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_LITTLE, read8s_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_BIG, read8s_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_LITTLE, read16s_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_BIG, read16s_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_LITTLE, read16s_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_BIG, read16s_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_LITTLE, read16s_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_BIG, read16s_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_LITTLE, read32s_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_BIG, read32s_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_LITTLE, read32s_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_BIG, read32s_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_LITTLE, read32s_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_BIG, read32s_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_LITTLE, read32s_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_BIG, read32s_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_LITTLE, read64s_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_BIG, read64s_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_LITTLE, read64s_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_BIG, read64s_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_LITTLE, read64s_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_BIG, read64s_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_LITTLE, read64s_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_BIG, read64s_delegate>;
-
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_LITTLE, read8sm_delegate>;
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_BIG, read8sm_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_LITTLE, read8sm_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_BIG, read8sm_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_LITTLE, read16sm_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_BIG, read16sm_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_LITTLE, read16sm_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_BIG, read16sm_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_LITTLE, read16sm_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_BIG, read16sm_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_LITTLE, read32sm_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_BIG, read32sm_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_LITTLE, read32sm_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_BIG, read32sm_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_LITTLE, read32sm_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_BIG, read32sm_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_LITTLE, read32sm_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_BIG, read32sm_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_LITTLE, read64sm_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_BIG, read64sm_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_LITTLE, read64sm_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_BIG, read64sm_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_LITTLE, read64sm_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_BIG, read64sm_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_LITTLE, read64sm_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_BIG, read64sm_delegate>;
-
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_LITTLE, read8mo_delegate>;
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_BIG, read8mo_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_LITTLE, read8mo_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_BIG, read8mo_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_LITTLE, read16mo_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_BIG, read16mo_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_LITTLE, read16mo_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_BIG, read16mo_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_LITTLE, read16mo_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_BIG, read16mo_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_LITTLE, read32mo_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_BIG, read32mo_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_LITTLE, read32mo_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_BIG, read32mo_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_LITTLE, read32mo_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_BIG, read32mo_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_LITTLE, read32mo_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_BIG, read32mo_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_LITTLE, read64mo_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_BIG, read64mo_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_LITTLE, read64mo_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_BIG, read64mo_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_LITTLE, read64mo_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_BIG, read64mo_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_LITTLE, read64mo_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_BIG, read64mo_delegate>;
-
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_LITTLE, read8smo_delegate>;
-template class handler_entry_read_delegate<0, 1, ENDIANNESS_BIG, read8smo_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_LITTLE, read8smo_delegate>;
-template class handler_entry_read_delegate<0, 0, ENDIANNESS_BIG, read8smo_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_LITTLE, read16smo_delegate>;
-template class handler_entry_read_delegate<1, 3, ENDIANNESS_BIG, read16smo_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_LITTLE, read16smo_delegate>;
-template class handler_entry_read_delegate<1, 0, ENDIANNESS_BIG, read16smo_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_LITTLE, read16smo_delegate>;
-template class handler_entry_read_delegate<1, -1, ENDIANNESS_BIG, read16smo_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_LITTLE, read32smo_delegate>;
-template class handler_entry_read_delegate<2, 3, ENDIANNESS_BIG, read32smo_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_LITTLE, read32smo_delegate>;
-template class handler_entry_read_delegate<2, 0, ENDIANNESS_BIG, read32smo_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_LITTLE, read32smo_delegate>;
-template class handler_entry_read_delegate<2, -1, ENDIANNESS_BIG, read32smo_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_LITTLE, read32smo_delegate>;
-template class handler_entry_read_delegate<2, -2, ENDIANNESS_BIG, read32smo_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_LITTLE, read64smo_delegate>;
-template class handler_entry_read_delegate<3, 0, ENDIANNESS_BIG, read64smo_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_LITTLE, read64smo_delegate>;
-template class handler_entry_read_delegate<3, -1, ENDIANNESS_BIG, read64smo_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_LITTLE, read64smo_delegate>;
-template class handler_entry_read_delegate<3, -2, ENDIANNESS_BIG, read64smo_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_LITTLE, read64smo_delegate>;
-template class handler_entry_read_delegate<3, -3, ENDIANNESS_BIG, read64smo_delegate>;
-
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_LITTLE, write8_delegate>;
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_BIG, write8_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_LITTLE, write8_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_BIG, write8_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_LITTLE, write16_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_BIG, write16_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_LITTLE, write16_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_BIG, write16_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_LITTLE, write16_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_BIG, write16_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_LITTLE, write32_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_BIG, write32_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_LITTLE, write32_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_BIG, write32_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_LITTLE, write32_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_BIG, write32_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_LITTLE, write32_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_BIG, write32_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_LITTLE, write64_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_BIG, write64_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_LITTLE, write64_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_BIG, write64_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_LITTLE, write64_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_BIG, write64_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_LITTLE, write64_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_BIG, write64_delegate>;
-
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_LITTLE, write8m_delegate>;
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_BIG, write8m_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_LITTLE, write8m_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_BIG, write8m_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_LITTLE, write16m_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_BIG, write16m_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_LITTLE, write16m_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_BIG, write16m_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_LITTLE, write16m_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_BIG, write16m_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_LITTLE, write32m_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_BIG, write32m_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_LITTLE, write32m_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_BIG, write32m_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_LITTLE, write32m_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_BIG, write32m_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_LITTLE, write32m_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_BIG, write32m_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_LITTLE, write64m_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_BIG, write64m_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_LITTLE, write64m_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_BIG, write64m_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_LITTLE, write64m_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_BIG, write64m_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_LITTLE, write64m_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_BIG, write64m_delegate>;
-
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_LITTLE, write8s_delegate>;
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_BIG, write8s_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_LITTLE, write8s_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_BIG, write8s_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_LITTLE, write16s_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_BIG, write16s_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_LITTLE, write16s_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_BIG, write16s_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_LITTLE, write16s_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_BIG, write16s_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_LITTLE, write32s_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_BIG, write32s_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_LITTLE, write32s_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_BIG, write32s_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_LITTLE, write32s_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_BIG, write32s_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_LITTLE, write32s_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_BIG, write32s_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_LITTLE, write64s_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_BIG, write64s_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_LITTLE, write64s_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_BIG, write64s_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_LITTLE, write64s_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_BIG, write64s_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_LITTLE, write64s_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_BIG, write64s_delegate>;
-
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_LITTLE, write8sm_delegate>;
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_BIG, write8sm_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_LITTLE, write8sm_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_BIG, write8sm_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_LITTLE, write16sm_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_BIG, write16sm_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_LITTLE, write16sm_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_BIG, write16sm_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_LITTLE, write16sm_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_BIG, write16sm_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_LITTLE, write32sm_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_BIG, write32sm_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_LITTLE, write32sm_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_BIG, write32sm_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_LITTLE, write32sm_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_BIG, write32sm_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_LITTLE, write32sm_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_BIG, write32sm_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_LITTLE, write64sm_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_BIG, write64sm_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_LITTLE, write64sm_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_BIG, write64sm_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_LITTLE, write64sm_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_BIG, write64sm_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_LITTLE, write64sm_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_BIG, write64sm_delegate>;
-
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_LITTLE, write8mo_delegate>;
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_BIG, write8mo_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_LITTLE, write8mo_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_BIG, write8mo_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_LITTLE, write16mo_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_BIG, write16mo_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_LITTLE, write16mo_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_BIG, write16mo_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_LITTLE, write16mo_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_BIG, write16mo_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_LITTLE, write32mo_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_BIG, write32mo_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_LITTLE, write32mo_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_BIG, write32mo_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_LITTLE, write32mo_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_BIG, write32mo_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_LITTLE, write32mo_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_BIG, write32mo_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_LITTLE, write64mo_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_BIG, write64mo_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_LITTLE, write64mo_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_BIG, write64mo_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_LITTLE, write64mo_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_BIG, write64mo_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_LITTLE, write64mo_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_BIG, write64mo_delegate>;
-
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_LITTLE, write8smo_delegate>;
-template class handler_entry_write_delegate<0, 1, ENDIANNESS_BIG, write8smo_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_LITTLE, write8smo_delegate>;
-template class handler_entry_write_delegate<0, 0, ENDIANNESS_BIG, write8smo_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_LITTLE, write16smo_delegate>;
-template class handler_entry_write_delegate<1, 3, ENDIANNESS_BIG, write16smo_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_LITTLE, write16smo_delegate>;
-template class handler_entry_write_delegate<1, 0, ENDIANNESS_BIG, write16smo_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_LITTLE, write16smo_delegate>;
-template class handler_entry_write_delegate<1, -1, ENDIANNESS_BIG, write16smo_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_LITTLE, write32smo_delegate>;
-template class handler_entry_write_delegate<2, 3, ENDIANNESS_BIG, write32smo_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_LITTLE, write32smo_delegate>;
-template class handler_entry_write_delegate<2, 0, ENDIANNESS_BIG, write32smo_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_LITTLE, write32smo_delegate>;
-template class handler_entry_write_delegate<2, -1, ENDIANNESS_BIG, write32smo_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_LITTLE, write32smo_delegate>;
-template class handler_entry_write_delegate<2, -2, ENDIANNESS_BIG, write32smo_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_LITTLE, write64smo_delegate>;
-template class handler_entry_write_delegate<3, 0, ENDIANNESS_BIG, write64smo_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_LITTLE, write64smo_delegate>;
-template class handler_entry_write_delegate<3, -1, ENDIANNESS_BIG, write64smo_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_LITTLE, write64smo_delegate>;
-template class handler_entry_write_delegate<3, -2, ENDIANNESS_BIG, write64smo_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_LITTLE, write64smo_delegate>;
-template class handler_entry_write_delegate<3, -3, ENDIANNESS_BIG, write64smo_delegate>;
-
-
-template class handler_entry_read_ioport<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_ioport<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_ioport<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_ioport<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_ioport<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_ioport<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_delegate<0, 1, read8_delegate>;
+template class handler_entry_read_delegate<0, 0, read8_delegate>;
+template class handler_entry_read_delegate<1, 3, read16_delegate>;
+template class handler_entry_read_delegate<1, 0, read16_delegate>;
+template class handler_entry_read_delegate<1, -1, read16_delegate>;
+template class handler_entry_read_delegate<2, 3, read32_delegate>;
+template class handler_entry_read_delegate<2, 0, read32_delegate>;
+template class handler_entry_read_delegate<2, -1, read32_delegate>;
+template class handler_entry_read_delegate<2, -2, read32_delegate>;
+template class handler_entry_read_delegate<3, 0, read64_delegate>;
+template class handler_entry_read_delegate<3, -1, read64_delegate>;
+template class handler_entry_read_delegate<3, -2, read64_delegate>;
+template class handler_entry_read_delegate<3, -3, read64_delegate>;
+
+template class handler_entry_read_delegate<0, 1, read8m_delegate>;
+template class handler_entry_read_delegate<0, 0, read8m_delegate>;
+template class handler_entry_read_delegate<1, 3, read16m_delegate>;
+template class handler_entry_read_delegate<1, 0, read16m_delegate>;
+template class handler_entry_read_delegate<1, -1, read16m_delegate>;
+template class handler_entry_read_delegate<2, 3, read32m_delegate>;
+template class handler_entry_read_delegate<2, 0, read32m_delegate>;
+template class handler_entry_read_delegate<2, -1, read32m_delegate>;
+template class handler_entry_read_delegate<2, -2, read32m_delegate>;
+template class handler_entry_read_delegate<3, 0, read64m_delegate>;
+template class handler_entry_read_delegate<3, -1, read64m_delegate>;
+template class handler_entry_read_delegate<3, -2, read64m_delegate>;
+template class handler_entry_read_delegate<3, -3, read64m_delegate>;
+
+template class handler_entry_read_delegate<0, 1, read8s_delegate>;
+template class handler_entry_read_delegate<0, 0, read8s_delegate>;
+template class handler_entry_read_delegate<1, 3, read16s_delegate>;
+template class handler_entry_read_delegate<1, 0, read16s_delegate>;
+template class handler_entry_read_delegate<1, -1, read16s_delegate>;
+template class handler_entry_read_delegate<2, 3, read32s_delegate>;
+template class handler_entry_read_delegate<2, 0, read32s_delegate>;
+template class handler_entry_read_delegate<2, -1, read32s_delegate>;
+template class handler_entry_read_delegate<2, -2, read32s_delegate>;
+template class handler_entry_read_delegate<3, 0, read64s_delegate>;
+template class handler_entry_read_delegate<3, -1, read64s_delegate>;
+template class handler_entry_read_delegate<3, -2, read64s_delegate>;
+template class handler_entry_read_delegate<3, -3, read64s_delegate>;
+
+template class handler_entry_read_delegate<0, 1, read8sm_delegate>;
+template class handler_entry_read_delegate<0, 0, read8sm_delegate>;
+template class handler_entry_read_delegate<1, 3, read16sm_delegate>;
+template class handler_entry_read_delegate<1, 0, read16sm_delegate>;
+template class handler_entry_read_delegate<1, -1, read16sm_delegate>;
+template class handler_entry_read_delegate<2, 3, read32sm_delegate>;
+template class handler_entry_read_delegate<2, 0, read32sm_delegate>;
+template class handler_entry_read_delegate<2, -1, read32sm_delegate>;
+template class handler_entry_read_delegate<2, -2, read32sm_delegate>;
+template class handler_entry_read_delegate<3, 0, read64sm_delegate>;
+template class handler_entry_read_delegate<3, -1, read64sm_delegate>;
+template class handler_entry_read_delegate<3, -2, read64sm_delegate>;
+template class handler_entry_read_delegate<3, -3, read64sm_delegate>;
+
+template class handler_entry_read_delegate<0, 1, read8mo_delegate>;
+template class handler_entry_read_delegate<0, 0, read8mo_delegate>;
+template class handler_entry_read_delegate<1, 3, read16mo_delegate>;
+template class handler_entry_read_delegate<1, 0, read16mo_delegate>;
+template class handler_entry_read_delegate<1, -1, read16mo_delegate>;
+template class handler_entry_read_delegate<2, 3, read32mo_delegate>;
+template class handler_entry_read_delegate<2, 0, read32mo_delegate>;
+template class handler_entry_read_delegate<2, -1, read32mo_delegate>;
+template class handler_entry_read_delegate<2, -2, read32mo_delegate>;
+template class handler_entry_read_delegate<3, 0, read64mo_delegate>;
+template class handler_entry_read_delegate<3, -1, read64mo_delegate>;
+template class handler_entry_read_delegate<3, -2, read64mo_delegate>;
+template class handler_entry_read_delegate<3, -3, read64mo_delegate>;
+
+template class handler_entry_read_delegate<0, 1, read8smo_delegate>;
+template class handler_entry_read_delegate<0, 0, read8smo_delegate>;
+template class handler_entry_read_delegate<1, 3, read16smo_delegate>;
+template class handler_entry_read_delegate<1, 0, read16smo_delegate>;
+template class handler_entry_read_delegate<1, -1, read16smo_delegate>;
+template class handler_entry_read_delegate<2, 3, read32smo_delegate>;
+template class handler_entry_read_delegate<2, 0, read32smo_delegate>;
+template class handler_entry_read_delegate<2, -1, read32smo_delegate>;
+template class handler_entry_read_delegate<2, -2, read32smo_delegate>;
+template class handler_entry_read_delegate<3, 0, read64smo_delegate>;
+template class handler_entry_read_delegate<3, -1, read64smo_delegate>;
+template class handler_entry_read_delegate<3, -2, read64smo_delegate>;
+template class handler_entry_read_delegate<3, -3, read64smo_delegate>;
+
+template class handler_entry_write_delegate<0, 1, write8_delegate>;
+template class handler_entry_write_delegate<0, 0, write8_delegate>;
+template class handler_entry_write_delegate<1, 3, write16_delegate>;
+template class handler_entry_write_delegate<1, 0, write16_delegate>;
+template class handler_entry_write_delegate<1, -1, write16_delegate>;
+template class handler_entry_write_delegate<2, 3, write32_delegate>;
+template class handler_entry_write_delegate<2, 0, write32_delegate>;
+template class handler_entry_write_delegate<2, -1, write32_delegate>;
+template class handler_entry_write_delegate<2, -2, write32_delegate>;
+template class handler_entry_write_delegate<3, 0, write64_delegate>;
+template class handler_entry_write_delegate<3, -1, write64_delegate>;
+template class handler_entry_write_delegate<3, -2, write64_delegate>;
+template class handler_entry_write_delegate<3, -3, write64_delegate>;
+
+template class handler_entry_write_delegate<0, 1, write8m_delegate>;
+template class handler_entry_write_delegate<0, 0, write8m_delegate>;
+template class handler_entry_write_delegate<1, 3, write16m_delegate>;
+template class handler_entry_write_delegate<1, 0, write16m_delegate>;
+template class handler_entry_write_delegate<1, -1, write16m_delegate>;
+template class handler_entry_write_delegate<2, 3, write32m_delegate>;
+template class handler_entry_write_delegate<2, 0, write32m_delegate>;
+template class handler_entry_write_delegate<2, -1, write32m_delegate>;
+template class handler_entry_write_delegate<2, -2, write32m_delegate>;
+template class handler_entry_write_delegate<3, 0, write64m_delegate>;
+template class handler_entry_write_delegate<3, -1, write64m_delegate>;
+template class handler_entry_write_delegate<3, -2, write64m_delegate>;
+template class handler_entry_write_delegate<3, -3, write64m_delegate>;
+
+template class handler_entry_write_delegate<0, 1, write8s_delegate>;
+template class handler_entry_write_delegate<0, 0, write8s_delegate>;
+template class handler_entry_write_delegate<1, 3, write16s_delegate>;
+template class handler_entry_write_delegate<1, 0, write16s_delegate>;
+template class handler_entry_write_delegate<1, -1, write16s_delegate>;
+template class handler_entry_write_delegate<2, 3, write32s_delegate>;
+template class handler_entry_write_delegate<2, 0, write32s_delegate>;
+template class handler_entry_write_delegate<2, -1, write32s_delegate>;
+template class handler_entry_write_delegate<2, -2, write32s_delegate>;
+template class handler_entry_write_delegate<3, 0, write64s_delegate>;
+template class handler_entry_write_delegate<3, -1, write64s_delegate>;
+template class handler_entry_write_delegate<3, -2, write64s_delegate>;
+template class handler_entry_write_delegate<3, -3, write64s_delegate>;
+
+template class handler_entry_write_delegate<0, 1, write8sm_delegate>;
+template class handler_entry_write_delegate<0, 0, write8sm_delegate>;
+template class handler_entry_write_delegate<1, 3, write16sm_delegate>;
+template class handler_entry_write_delegate<1, 0, write16sm_delegate>;
+template class handler_entry_write_delegate<1, -1, write16sm_delegate>;
+template class handler_entry_write_delegate<2, 3, write32sm_delegate>;
+template class handler_entry_write_delegate<2, 0, write32sm_delegate>;
+template class handler_entry_write_delegate<2, -1, write32sm_delegate>;
+template class handler_entry_write_delegate<2, -2, write32sm_delegate>;
+template class handler_entry_write_delegate<3, 0, write64sm_delegate>;
+template class handler_entry_write_delegate<3, -1, write64sm_delegate>;
+template class handler_entry_write_delegate<3, -2, write64sm_delegate>;
+template class handler_entry_write_delegate<3, -3, write64sm_delegate>;
+
+template class handler_entry_write_delegate<0, 1, write8mo_delegate>;
+template class handler_entry_write_delegate<0, 0, write8mo_delegate>;
+template class handler_entry_write_delegate<1, 3, write16mo_delegate>;
+template class handler_entry_write_delegate<1, 0, write16mo_delegate>;
+template class handler_entry_write_delegate<1, -1, write16mo_delegate>;
+template class handler_entry_write_delegate<2, 3, write32mo_delegate>;
+template class handler_entry_write_delegate<2, 0, write32mo_delegate>;
+template class handler_entry_write_delegate<2, -1, write32mo_delegate>;
+template class handler_entry_write_delegate<2, -2, write32mo_delegate>;
+template class handler_entry_write_delegate<3, 0, write64mo_delegate>;
+template class handler_entry_write_delegate<3, -1, write64mo_delegate>;
+template class handler_entry_write_delegate<3, -2, write64mo_delegate>;
+template class handler_entry_write_delegate<3, -3, write64mo_delegate>;
+
+template class handler_entry_write_delegate<0, 1, write8smo_delegate>;
+template class handler_entry_write_delegate<0, 0, write8smo_delegate>;
+template class handler_entry_write_delegate<1, 3, write16smo_delegate>;
+template class handler_entry_write_delegate<1, 0, write16smo_delegate>;
+template class handler_entry_write_delegate<1, -1, write16smo_delegate>;
+template class handler_entry_write_delegate<2, 3, write32smo_delegate>;
+template class handler_entry_write_delegate<2, 0, write32smo_delegate>;
+template class handler_entry_write_delegate<2, -1, write32smo_delegate>;
+template class handler_entry_write_delegate<2, -2, write32smo_delegate>;
+template class handler_entry_write_delegate<3, 0, write64smo_delegate>;
+template class handler_entry_write_delegate<3, -1, write64smo_delegate>;
+template class handler_entry_write_delegate<3, -2, write64smo_delegate>;
+template class handler_entry_write_delegate<3, -3, write64smo_delegate>;
+
+
+template class handler_entry_read_ioport<0, 1>;
+template class handler_entry_read_ioport<0, 0>;
+template class handler_entry_read_ioport<1, 3>;
+template class handler_entry_read_ioport<1, 0>;
+template class handler_entry_read_ioport<1, -1>;
+template class handler_entry_read_ioport<2, 3>;
+template class handler_entry_read_ioport<2, 0>;
+template class handler_entry_read_ioport<2, -1>;
+template class handler_entry_read_ioport<2, -2>;
+template class handler_entry_read_ioport<3, 0>;
+template class handler_entry_read_ioport<3, -1>;
+template class handler_entry_read_ioport<3, -2>;
+template class handler_entry_read_ioport<3, -3>;
+
+template class handler_entry_write_ioport<0, 1>;
+template class handler_entry_write_ioport<0, 0>;
+template class handler_entry_write_ioport<1, 3>;
+template class handler_entry_write_ioport<1, 0>;
+template class handler_entry_write_ioport<1, -1>;
+template class handler_entry_write_ioport<2, 3>;
+template class handler_entry_write_ioport<2, 0>;
+template class handler_entry_write_ioport<2, -1>;
+template class handler_entry_write_ioport<2, -2>;
+template class handler_entry_write_ioport<3, 0>;
+template class handler_entry_write_ioport<3, -1>;
+template class handler_entry_write_ioport<3, -2>;
+template class handler_entry_write_ioport<3, -3>;
diff --git a/src/emu/emumem_hedp.h b/src/emu/emumem_hedp.h
index f55f583c768..1481829090c 100644
--- a/src/emu/emumem_hedp.h
+++ b/src/emu/emumem_hedp.h
@@ -9,12 +9,12 @@
// Executes an access through called a delegate, usually containing a handler or a lambda
-template<int Width, int AddrShift, endianness_t Endian, typename READ> class handler_entry_read_delegate : public handler_entry_read_address<Width, AddrShift, Endian>
+template<int Width, int AddrShift, typename READ> class handler_entry_read_delegate : public handler_entry_read_address<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, const READ &delegate) : handler_entry_read_address<Width, AddrShift>(space, 0), m_delegate(delegate) {}
~handler_entry_read_delegate() = default;
uX read(offs_t offset, uX mem_mask) const override;
@@ -67,12 +67,12 @@ private:
uX> read_impl(offs_t offset, uX mem_mask) const;
};
-template<int Width, int AddrShift, endianness_t Endian, typename WRITE> class handler_entry_write_delegate : public handler_entry_write_address<Width, AddrShift, Endian>
+template<int Width, int AddrShift, typename WRITE> class handler_entry_write_delegate : public handler_entry_write_address<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, const WRITE &delegate) : handler_entry_write_address<Width, AddrShift>(space, 0), m_delegate(delegate) {}
~handler_entry_write_delegate() = default;
void write(offs_t offset, uX data, uX mem_mask) const override;
@@ -130,12 +130,12 @@ private:
// Accesses an ioport
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_ioport : public handler_entry_read<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_ioport : public handler_entry_read<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, ioport_port *port) : handler_entry_read<Width, AddrShift>(space, 0), m_port(port) {}
~handler_entry_read_ioport() = default;
uX read(offs_t offset, uX mem_mask) const override;
@@ -146,12 +146,12 @@ private:
ioport_port *m_port;
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_ioport : public handler_entry_write<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_ioport : public handler_entry_write<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, ioport_port *port) : handler_entry_write<Width, AddrShift>(space, 0), m_port(port) {}
~handler_entry_write_ioport() = default;
void write(offs_t offset, uX data, uX mem_mask) const override;
diff --git a/src/emu/emumem_hedr.h b/src/emu/emumem_hedr.h
index e2278e5132b..fb31886d1e0 100644
--- a/src/emu/emumem_hedr.h
+++ b/src/emu/emumem_hedr.h
@@ -10,42 +10,42 @@
// dispatches an access among multiple handlers indexed on part of the
// address and when appropriate a selected view
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> class handler_entry_read_dispatch : public handler_entry_read<Width, AddrShift, Endian>
+template<int HighBits, int Width, int AddrShift> class handler_entry_read_dispatch : public handler_entry_read<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- using mapping = typename handler_entry_read<Width, AddrShift, Endian>::mapping;
+ using mapping = typename handler_entry_read<Width, AddrShift>::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, const handler_entry::range &init, handler_entry_read<Width, AddrShift> *handler);
handler_entry_read_dispatch(address_space *space, memory_view &view);
- handler_entry_read_dispatch(handler_entry_read_dispatch<HighBits, Width, AddrShift, Endian> *src);
+ handler_entry_read_dispatch(handler_entry_read_dispatch<HighBits, Width, AddrShift> *src);
~handler_entry_read_dispatch();
uX read(offs_t offset, uX mem_mask) const override;
void *get_ptr(offs_t offset) const override;
- void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift, Endian> *&handler) const override;
+ void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_read<Width, AddrShift> *&handler) const override;
void dump_map(std::vector<memory_entry> &map) const override;
std::string name() const override;
- void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift, Endian> *handler) override;
- void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift, Endian> *handler) override;
- void 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) override;
- void 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) override;
- void 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) override;
- void 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) override;
+ void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift> *handler) override;
+ void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_read<Width, AddrShift> *handler) override;
+ void 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) override;
+ void 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) override;
+ void 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) override;
+ void 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) override;
void detach(const std::unordered_set<handler_entry *> &handlers) override;
void range_cut_before(offs_t address, int start = COUNT);
void range_cut_after(offs_t address, int start = -1);
void enumerate_references(handler_entry::reflist &refs) const override;
- const handler_entry_read<Width, AddrShift, Endian> *const *get_dispatch() const override;
+ const handler_entry_read<Width, AddrShift> *const *get_dispatch() const override;
void select_a(int slot) override;
void select_u(int slot) override;
- void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_read<Width, AddrShift, Endian> **dispatch, handler_entry::range *ranges) override;
- handler_entry_read<Width, AddrShift, Endian> *dup() override;
+ void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_read<Width, AddrShift> **dispatch, handler_entry::range *ranges) override;
+ handler_entry_read<Width, AddrShift> *dup() override;
private:
static constexpr int Level = emu::detail::handler_entry_dispatch_level(HighBits);
@@ -57,10 +57,10 @@ private:
static constexpr offs_t HIGHMASK = make_bitmask<offs_t>(HighBits) ^ LOWMASK;
static constexpr offs_t UPMASK = ~make_bitmask<offs_t>(HighBits);
- class handler_array : public std::array<handler_entry_read<Width, AddrShift, Endian> *, COUNT>
+ class handler_array : public std::array<handler_entry_read<Width, AddrShift> *, COUNT>
{
public:
- using std::array<handler_entry_read<Width, AddrShift, Endian> *, COUNT>::array;
+ using std::array<handler_entry_read<Width, AddrShift> *, COUNT>::array;
handler_array()
{
std::fill(this->begin(), this->end(), nullptr);
@@ -82,22 +82,22 @@ private:
std::vector<handler_array> m_dispatch_array;
std::vector<range_array> m_ranges_array;
- handler_entry_read<Width, AddrShift, Endian> **m_a_dispatch;
+ handler_entry_read<Width, AddrShift> **m_a_dispatch;
handler_entry::range *m_a_ranges;
- handler_entry_read<Width, AddrShift, Endian> **m_u_dispatch;
+ handler_entry_read<Width, AddrShift> **m_u_dispatch;
handler_entry::range *m_u_ranges;
- void 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);
- void 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);
+ void populate_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_read<Width, AddrShift> *handler);
+ void 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);
- void 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);
- void 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);
- void mismatched_patch(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift, Endian> *&target);
+ void 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);
+ void 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);
+ void mismatched_patch(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift> *&target);
- void 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);
- 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);
+ void 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);
+ 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> *handler, std::vector<mapping> &mappings);
+ void passthrough_patch(handler_entry_read_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings, handler_entry_read<Width, AddrShift> *&target);
};
#endif // MAME_EMU_EMUMEM_HEDR_H
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
diff --git a/src/emu/emumem_hedr0.cpp b/src/emu/emumem_hedr0.cpp
index 0dbd929412e..aeddb8dce6f 100644
--- a/src/emu/emumem_hedr0.cpp
+++ b/src/emu/emumem_hedr0.cpp
@@ -5,225 +5,120 @@
#include "emumem_hedr.ipp"
-template class handler_entry_read_dispatch< 0, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 0, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 1, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 0, 0, 1>;
+template class handler_entry_read_dispatch< 1, 0, 1>;
+template class handler_entry_read_dispatch< 2, 0, 1>;
+template class handler_entry_read_dispatch< 3, 0, 1>;
+template class handler_entry_read_dispatch< 4, 0, 1>;
+template class handler_entry_read_dispatch< 5, 0, 1>;
+template class handler_entry_read_dispatch< 6, 0, 1>;
+template class handler_entry_read_dispatch< 7, 0, 1>;
+template class handler_entry_read_dispatch< 8, 0, 1>;
-template class handler_entry_read_dispatch< 0, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 0, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 1, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 0, 0, 0>;
+template class handler_entry_read_dispatch< 1, 0, 0>;
+template class handler_entry_read_dispatch< 2, 0, 0>;
+template class handler_entry_read_dispatch< 3, 0, 0>;
+template class handler_entry_read_dispatch< 4, 0, 0>;
+template class handler_entry_read_dispatch< 5, 0, 0>;
+template class handler_entry_read_dispatch< 6, 0, 0>;
+template class handler_entry_read_dispatch< 7, 0, 0>;
+template class handler_entry_read_dispatch< 8, 0, 0>;
-template class handler_entry_read_dispatch< 0, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 0, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 1, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 0, 1, 3>;
+template class handler_entry_read_dispatch< 1, 1, 3>;
+template class handler_entry_read_dispatch< 2, 1, 3>;
+template class handler_entry_read_dispatch< 3, 1, 3>;
+template class handler_entry_read_dispatch< 4, 1, 3>;
+template class handler_entry_read_dispatch< 5, 1, 3>;
+template class handler_entry_read_dispatch< 6, 1, 3>;
+template class handler_entry_read_dispatch< 7, 1, 3>;
+template class handler_entry_read_dispatch< 8, 1, 3>;
-template class handler_entry_read_dispatch< 1, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 1, 1, 0>;
+template class handler_entry_read_dispatch< 2, 1, 0>;
+template class handler_entry_read_dispatch< 3, 1, 0>;
+template class handler_entry_read_dispatch< 4, 1, 0>;
+template class handler_entry_read_dispatch< 5, 1, 0>;
+template class handler_entry_read_dispatch< 6, 1, 0>;
+template class handler_entry_read_dispatch< 7, 1, 0>;
+template class handler_entry_read_dispatch< 8, 1, 0>;
-template class handler_entry_read_dispatch< 0, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 0, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 1, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 0, 1, -1>;
+template class handler_entry_read_dispatch< 1, 1, -1>;
+template class handler_entry_read_dispatch< 2, 1, -1>;
+template class handler_entry_read_dispatch< 3, 1, -1>;
+template class handler_entry_read_dispatch< 4, 1, -1>;
+template class handler_entry_read_dispatch< 5, 1, -1>;
+template class handler_entry_read_dispatch< 6, 1, -1>;
+template class handler_entry_read_dispatch< 7, 1, -1>;
+template class handler_entry_read_dispatch< 8, 1, -1>;
-template class handler_entry_read_dispatch< 2, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 2, 2, 3>;
+template class handler_entry_read_dispatch< 3, 2, 3>;
+template class handler_entry_read_dispatch< 4, 2, 3>;
+template class handler_entry_read_dispatch< 5, 2, 3>;
+template class handler_entry_read_dispatch< 6, 2, 3>;
+template class handler_entry_read_dispatch< 7, 2, 3>;
+template class handler_entry_read_dispatch< 8, 2, 3>;
-template class handler_entry_read_dispatch< 2, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 2, 2, 0>;
+template class handler_entry_read_dispatch< 3, 2, 0>;
+template class handler_entry_read_dispatch< 4, 2, 0>;
+template class handler_entry_read_dispatch< 5, 2, 0>;
+template class handler_entry_read_dispatch< 6, 2, 0>;
+template class handler_entry_read_dispatch< 7, 2, 0>;
+template class handler_entry_read_dispatch< 8, 2, 0>;
-template class handler_entry_read_dispatch< 1, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 1, 2, -1>;
+template class handler_entry_read_dispatch< 2, 2, -1>;
+template class handler_entry_read_dispatch< 3, 2, -1>;
+template class handler_entry_read_dispatch< 4, 2, -1>;
+template class handler_entry_read_dispatch< 5, 2, -1>;
+template class handler_entry_read_dispatch< 6, 2, -1>;
+template class handler_entry_read_dispatch< 7, 2, -1>;
+template class handler_entry_read_dispatch< 8, 2, -1>;
-template class handler_entry_read_dispatch< 0, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 0, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 1, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 0, 2, -2>;
+template class handler_entry_read_dispatch< 1, 2, -2>;
+template class handler_entry_read_dispatch< 2, 2, -2>;
+template class handler_entry_read_dispatch< 3, 2, -2>;
+template class handler_entry_read_dispatch< 4, 2, -2>;
+template class handler_entry_read_dispatch< 5, 2, -2>;
+template class handler_entry_read_dispatch< 6, 2, -2>;
+template class handler_entry_read_dispatch< 7, 2, -2>;
+template class handler_entry_read_dispatch< 8, 2, -2>;
-template class handler_entry_read_dispatch< 3, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 3, 3, 0>;
+template class handler_entry_read_dispatch< 4, 3, 0>;
+template class handler_entry_read_dispatch< 5, 3, 0>;
+template class handler_entry_read_dispatch< 6, 3, 0>;
+template class handler_entry_read_dispatch< 7, 3, 0>;
+template class handler_entry_read_dispatch< 8, 3, 0>;
-template class handler_entry_read_dispatch< 2, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 2, 3, -1>;
+template class handler_entry_read_dispatch< 3, 3, -1>;
+template class handler_entry_read_dispatch< 4, 3, -1>;
+template class handler_entry_read_dispatch< 5, 3, -1>;
+template class handler_entry_read_dispatch< 6, 3, -1>;
+template class handler_entry_read_dispatch< 7, 3, -1>;
+template class handler_entry_read_dispatch< 8, 3, -1>;
-template class handler_entry_read_dispatch< 1, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 1, 3, -2>;
+template class handler_entry_read_dispatch< 2, 3, -2>;
+template class handler_entry_read_dispatch< 3, 3, -2>;
+template class handler_entry_read_dispatch< 4, 3, -2>;
+template class handler_entry_read_dispatch< 5, 3, -2>;
+template class handler_entry_read_dispatch< 6, 3, -2>;
+template class handler_entry_read_dispatch< 7, 3, -2>;
+template class handler_entry_read_dispatch< 8, 3, -2>;
-template class handler_entry_read_dispatch< 0, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 0, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 1, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 1, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 2, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 2, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 3, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 3, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 4, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 4, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 5, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 5, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 6, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 6, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 7, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 7, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch< 8, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 8, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 0, 3, -3>;
+template class handler_entry_read_dispatch< 1, 3, -3>;
+template class handler_entry_read_dispatch< 2, 3, -3>;
+template class handler_entry_read_dispatch< 3, 3, -3>;
+template class handler_entry_read_dispatch< 4, 3, -3>;
+template class handler_entry_read_dispatch< 5, 3, -3>;
+template class handler_entry_read_dispatch< 6, 3, -3>;
+template class handler_entry_read_dispatch< 7, 3, -3>;
+template class handler_entry_read_dispatch< 8, 3, -3>;
diff --git a/src/emu/emumem_hedr1.cpp b/src/emu/emumem_hedr1.cpp
index 253b7e987f2..d28a67bbe34 100644
--- a/src/emu/emumem_hedr1.cpp
+++ b/src/emu/emumem_hedr1.cpp
@@ -4,223 +4,119 @@
#include "emu.h"
#include "emumem_hedr.ipp"
-template class handler_entry_read_dispatch< 9, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 0, 1>;
+template class handler_entry_read_dispatch<10, 0, 1>;
+template class handler_entry_read_dispatch<11, 0, 1>;
+template class handler_entry_read_dispatch<12, 0, 1>;
+template class handler_entry_read_dispatch<13, 0, 1>;
+template class handler_entry_read_dispatch<14, 0, 1>;
+template class handler_entry_read_dispatch<15, 0, 1>;
+template class handler_entry_read_dispatch<16, 0, 1>;
-template class handler_entry_read_dispatch< 9, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 0, 0>;
+template class handler_entry_read_dispatch<10, 0, 0>;
+template class handler_entry_read_dispatch<11, 0, 0>;
+template class handler_entry_read_dispatch<12, 0, 0>;
+template class handler_entry_read_dispatch<13, 0, 0>;
+template class handler_entry_read_dispatch<14, 0, 0>;
+template class handler_entry_read_dispatch<15, 0, 0>;
+template class handler_entry_read_dispatch<16, 0, 0>;
-template class handler_entry_read_dispatch< 9, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 1, 3>;
+template class handler_entry_read_dispatch<10, 1, 3>;
+template class handler_entry_read_dispatch<11, 1, 3>;
+template class handler_entry_read_dispatch<12, 1, 3>;
+template class handler_entry_read_dispatch<13, 1, 3>;
+template class handler_entry_read_dispatch<14, 1, 3>;
+template class handler_entry_read_dispatch<15, 1, 3>;
+template class handler_entry_read_dispatch<16, 1, 3>;
-template class handler_entry_read_dispatch< 9, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 1, 0>;
+template class handler_entry_read_dispatch<10, 1, 0>;
+template class handler_entry_read_dispatch<11, 1, 0>;
+template class handler_entry_read_dispatch<12, 1, 0>;
+template class handler_entry_read_dispatch<13, 1, 0>;
+template class handler_entry_read_dispatch<14, 1, 0>;
+template class handler_entry_read_dispatch<15, 1, 0>;
+template class handler_entry_read_dispatch<16, 1, 0>;
-template class handler_entry_read_dispatch< 9, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 1, -1>;
+template class handler_entry_read_dispatch<10, 1, -1>;
+template class handler_entry_read_dispatch<11, 1, -1>;
+template class handler_entry_read_dispatch<12, 1, -1>;
+template class handler_entry_read_dispatch<13, 1, -1>;
+template class handler_entry_read_dispatch<14, 1, -1>;
+template class handler_entry_read_dispatch<15, 1, -1>;
+template class handler_entry_read_dispatch<16, 1, -1>;
-template class handler_entry_read_dispatch< 9, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 2, 3>;
+template class handler_entry_read_dispatch<10, 2, 3>;
+template class handler_entry_read_dispatch<11, 2, 3>;
+template class handler_entry_read_dispatch<12, 2, 3>;
+template class handler_entry_read_dispatch<13, 2, 3>;
+template class handler_entry_read_dispatch<14, 2, 3>;
+template class handler_entry_read_dispatch<15, 2, 3>;
+template class handler_entry_read_dispatch<16, 2, 3>;
-template class handler_entry_read_dispatch< 9, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 2, 0>;
+template class handler_entry_read_dispatch<10, 2, 0>;
+template class handler_entry_read_dispatch<11, 2, 0>;
+template class handler_entry_read_dispatch<12, 2, 0>;
+template class handler_entry_read_dispatch<13, 2, 0>;
+template class handler_entry_read_dispatch<14, 2, 0>;
+template class handler_entry_read_dispatch<15, 2, 0>;
+template class handler_entry_read_dispatch<16, 2, 0>;
-template class handler_entry_read_dispatch< 9, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 2, -1>;
+template class handler_entry_read_dispatch<10, 2, -1>;
+template class handler_entry_read_dispatch<11, 2, -1>;
+template class handler_entry_read_dispatch<12, 2, -1>;
+template class handler_entry_read_dispatch<13, 2, -1>;
+template class handler_entry_read_dispatch<14, 2, -1>;
+template class handler_entry_read_dispatch<15, 2, -1>;
+template class handler_entry_read_dispatch<16, 2, -1>;
-template class handler_entry_read_dispatch< 9, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 2, -2>;
+template class handler_entry_read_dispatch<10, 2, -2>;
+template class handler_entry_read_dispatch<11, 2, -2>;
+template class handler_entry_read_dispatch<12, 2, -2>;
+template class handler_entry_read_dispatch<13, 2, -2>;
+template class handler_entry_read_dispatch<14, 2, -2>;
+template class handler_entry_read_dispatch<15, 2, -2>;
+template class handler_entry_read_dispatch<16, 2, -2>;
-template class handler_entry_read_dispatch< 9, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 3, 0>;
+template class handler_entry_read_dispatch<10, 3, 0>;
+template class handler_entry_read_dispatch<11, 3, 0>;
+template class handler_entry_read_dispatch<12, 3, 0>;
+template class handler_entry_read_dispatch<13, 3, 0>;
+template class handler_entry_read_dispatch<14, 3, 0>;
+template class handler_entry_read_dispatch<15, 3, 0>;
+template class handler_entry_read_dispatch<16, 3, 0>;
-template class handler_entry_read_dispatch< 9, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 3, -1>;
+template class handler_entry_read_dispatch<10, 3, -1>;
+template class handler_entry_read_dispatch<11, 3, -1>;
+template class handler_entry_read_dispatch<12, 3, -1>;
+template class handler_entry_read_dispatch<13, 3, -1>;
+template class handler_entry_read_dispatch<14, 3, -1>;
+template class handler_entry_read_dispatch<15, 3, -1>;
+template class handler_entry_read_dispatch<16, 3, -1>;
-template class handler_entry_read_dispatch< 9, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 3, -2>;
+template class handler_entry_read_dispatch<10, 3, -2>;
+template class handler_entry_read_dispatch<11, 3, -2>;
+template class handler_entry_read_dispatch<12, 3, -2>;
+template class handler_entry_read_dispatch<13, 3, -2>;
+template class handler_entry_read_dispatch<14, 3, -2>;
+template class handler_entry_read_dispatch<15, 3, -2>;
+template class handler_entry_read_dispatch<16, 3, -2>;
-template class handler_entry_read_dispatch< 9, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch< 9, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<10, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<10, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<11, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<11, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<12, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<12, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<13, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<13, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<14, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<14, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<15, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<15, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<16, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<16, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch< 9, 3, -3>;
+template class handler_entry_read_dispatch<10, 3, -3>;
+template class handler_entry_read_dispatch<11, 3, -3>;
+template class handler_entry_read_dispatch<12, 3, -3>;
+template class handler_entry_read_dispatch<13, 3, -3>;
+template class handler_entry_read_dispatch<14, 3, -3>;
+template class handler_entry_read_dispatch<15, 3, -3>;
+template class handler_entry_read_dispatch<16, 3, -3>;
diff --git a/src/emu/emumem_hedr2.cpp b/src/emu/emumem_hedr2.cpp
index 11a108c7522..6a665b14827 100644
--- a/src/emu/emumem_hedr2.cpp
+++ b/src/emu/emumem_hedr2.cpp
@@ -4,223 +4,119 @@
#include "emu.h"
#include "emumem_hedr.ipp"
-template class handler_entry_read_dispatch<17, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 0, 1>;
+template class handler_entry_read_dispatch<18, 0, 1>;
+template class handler_entry_read_dispatch<19, 0, 1>;
+template class handler_entry_read_dispatch<20, 0, 1>;
+template class handler_entry_read_dispatch<21, 0, 1>;
+template class handler_entry_read_dispatch<22, 0, 1>;
+template class handler_entry_read_dispatch<23, 0, 1>;
+template class handler_entry_read_dispatch<24, 0, 1>;
-template class handler_entry_read_dispatch<17, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 0, 0>;
+template class handler_entry_read_dispatch<18, 0, 0>;
+template class handler_entry_read_dispatch<19, 0, 0>;
+template class handler_entry_read_dispatch<20, 0, 0>;
+template class handler_entry_read_dispatch<21, 0, 0>;
+template class handler_entry_read_dispatch<22, 0, 0>;
+template class handler_entry_read_dispatch<23, 0, 0>;
+template class handler_entry_read_dispatch<24, 0, 0>;
-template class handler_entry_read_dispatch<17, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 1, 3>;
+template class handler_entry_read_dispatch<18, 1, 3>;
+template class handler_entry_read_dispatch<19, 1, 3>;
+template class handler_entry_read_dispatch<20, 1, 3>;
+template class handler_entry_read_dispatch<21, 1, 3>;
+template class handler_entry_read_dispatch<22, 1, 3>;
+template class handler_entry_read_dispatch<23, 1, 3>;
+template class handler_entry_read_dispatch<24, 1, 3>;
-template class handler_entry_read_dispatch<17, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 1, 0>;
+template class handler_entry_read_dispatch<18, 1, 0>;
+template class handler_entry_read_dispatch<19, 1, 0>;
+template class handler_entry_read_dispatch<20, 1, 0>;
+template class handler_entry_read_dispatch<21, 1, 0>;
+template class handler_entry_read_dispatch<22, 1, 0>;
+template class handler_entry_read_dispatch<23, 1, 0>;
+template class handler_entry_read_dispatch<24, 1, 0>;
-template class handler_entry_read_dispatch<17, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 1, -1>;
+template class handler_entry_read_dispatch<18, 1, -1>;
+template class handler_entry_read_dispatch<19, 1, -1>;
+template class handler_entry_read_dispatch<20, 1, -1>;
+template class handler_entry_read_dispatch<21, 1, -1>;
+template class handler_entry_read_dispatch<22, 1, -1>;
+template class handler_entry_read_dispatch<23, 1, -1>;
+template class handler_entry_read_dispatch<24, 1, -1>;
-template class handler_entry_read_dispatch<17, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 2, 3>;
+template class handler_entry_read_dispatch<18, 2, 3>;
+template class handler_entry_read_dispatch<19, 2, 3>;
+template class handler_entry_read_dispatch<20, 2, 3>;
+template class handler_entry_read_dispatch<21, 2, 3>;
+template class handler_entry_read_dispatch<22, 2, 3>;
+template class handler_entry_read_dispatch<23, 2, 3>;
+template class handler_entry_read_dispatch<24, 2, 3>;
-template class handler_entry_read_dispatch<17, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 2, 0>;
+template class handler_entry_read_dispatch<18, 2, 0>;
+template class handler_entry_read_dispatch<19, 2, 0>;
+template class handler_entry_read_dispatch<20, 2, 0>;
+template class handler_entry_read_dispatch<21, 2, 0>;
+template class handler_entry_read_dispatch<22, 2, 0>;
+template class handler_entry_read_dispatch<23, 2, 0>;
+template class handler_entry_read_dispatch<24, 2, 0>;
-template class handler_entry_read_dispatch<17, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 2, -1>;
+template class handler_entry_read_dispatch<18, 2, -1>;
+template class handler_entry_read_dispatch<19, 2, -1>;
+template class handler_entry_read_dispatch<20, 2, -1>;
+template class handler_entry_read_dispatch<21, 2, -1>;
+template class handler_entry_read_dispatch<22, 2, -1>;
+template class handler_entry_read_dispatch<23, 2, -1>;
+template class handler_entry_read_dispatch<24, 2, -1>;
-template class handler_entry_read_dispatch<17, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 2, -2>;
+template class handler_entry_read_dispatch<18, 2, -2>;
+template class handler_entry_read_dispatch<19, 2, -2>;
+template class handler_entry_read_dispatch<20, 2, -2>;
+template class handler_entry_read_dispatch<21, 2, -2>;
+template class handler_entry_read_dispatch<22, 2, -2>;
+template class handler_entry_read_dispatch<23, 2, -2>;
+template class handler_entry_read_dispatch<24, 2, -2>;
-template class handler_entry_read_dispatch<17, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 3, 0>;
+template class handler_entry_read_dispatch<18, 3, 0>;
+template class handler_entry_read_dispatch<19, 3, 0>;
+template class handler_entry_read_dispatch<20, 3, 0>;
+template class handler_entry_read_dispatch<21, 3, 0>;
+template class handler_entry_read_dispatch<22, 3, 0>;
+template class handler_entry_read_dispatch<23, 3, 0>;
+template class handler_entry_read_dispatch<24, 3, 0>;
-template class handler_entry_read_dispatch<17, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 3, -1>;
+template class handler_entry_read_dispatch<18, 3, -1>;
+template class handler_entry_read_dispatch<19, 3, -1>;
+template class handler_entry_read_dispatch<20, 3, -1>;
+template class handler_entry_read_dispatch<21, 3, -1>;
+template class handler_entry_read_dispatch<22, 3, -1>;
+template class handler_entry_read_dispatch<23, 3, -1>;
+template class handler_entry_read_dispatch<24, 3, -1>;
-template class handler_entry_read_dispatch<17, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 3, -2>;
+template class handler_entry_read_dispatch<18, 3, -2>;
+template class handler_entry_read_dispatch<19, 3, -2>;
+template class handler_entry_read_dispatch<20, 3, -2>;
+template class handler_entry_read_dispatch<21, 3, -2>;
+template class handler_entry_read_dispatch<22, 3, -2>;
+template class handler_entry_read_dispatch<23, 3, -2>;
+template class handler_entry_read_dispatch<24, 3, -2>;
-template class handler_entry_read_dispatch<17, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<17, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<18, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<18, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<19, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<19, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<20, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<20, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<21, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<21, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<22, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<22, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<23, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<23, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<24, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<24, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<17, 3, -3>;
+template class handler_entry_read_dispatch<18, 3, -3>;
+template class handler_entry_read_dispatch<19, 3, -3>;
+template class handler_entry_read_dispatch<20, 3, -3>;
+template class handler_entry_read_dispatch<21, 3, -3>;
+template class handler_entry_read_dispatch<22, 3, -3>;
+template class handler_entry_read_dispatch<23, 3, -3>;
+template class handler_entry_read_dispatch<24, 3, -3>;
diff --git a/src/emu/emumem_hedr3.cpp b/src/emu/emumem_hedr3.cpp
index 9c610294a99..190a62f9ce0 100644
--- a/src/emu/emumem_hedr3.cpp
+++ b/src/emu/emumem_hedr3.cpp
@@ -5,223 +5,119 @@
#include "emumem_hedr.ipp"
-template class handler_entry_read_dispatch<25, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 0, 1>;
+template class handler_entry_read_dispatch<26, 0, 1>;
+template class handler_entry_read_dispatch<27, 0, 1>;
+template class handler_entry_read_dispatch<28, 0, 1>;
+template class handler_entry_read_dispatch<29, 0, 1>;
+template class handler_entry_read_dispatch<30, 0, 1>;
+template class handler_entry_read_dispatch<31, 0, 1>;
+template class handler_entry_read_dispatch<32, 0, 1>;
-template class handler_entry_read_dispatch<25, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 0, 0>;
+template class handler_entry_read_dispatch<26, 0, 0>;
+template class handler_entry_read_dispatch<27, 0, 0>;
+template class handler_entry_read_dispatch<28, 0, 0>;
+template class handler_entry_read_dispatch<29, 0, 0>;
+template class handler_entry_read_dispatch<30, 0, 0>;
+template class handler_entry_read_dispatch<31, 0, 0>;
+template class handler_entry_read_dispatch<32, 0, 0>;
-template class handler_entry_read_dispatch<25, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 1, 3>;
+template class handler_entry_read_dispatch<26, 1, 3>;
+template class handler_entry_read_dispatch<27, 1, 3>;
+template class handler_entry_read_dispatch<28, 1, 3>;
+template class handler_entry_read_dispatch<29, 1, 3>;
+template class handler_entry_read_dispatch<30, 1, 3>;
+template class handler_entry_read_dispatch<31, 1, 3>;
+template class handler_entry_read_dispatch<32, 1, 3>;
-template class handler_entry_read_dispatch<25, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 1, 0>;
+template class handler_entry_read_dispatch<26, 1, 0>;
+template class handler_entry_read_dispatch<27, 1, 0>;
+template class handler_entry_read_dispatch<28, 1, 0>;
+template class handler_entry_read_dispatch<29, 1, 0>;
+template class handler_entry_read_dispatch<30, 1, 0>;
+template class handler_entry_read_dispatch<31, 1, 0>;
+template class handler_entry_read_dispatch<32, 1, 0>;
-template class handler_entry_read_dispatch<25, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 1, -1>;
+template class handler_entry_read_dispatch<26, 1, -1>;
+template class handler_entry_read_dispatch<27, 1, -1>;
+template class handler_entry_read_dispatch<28, 1, -1>;
+template class handler_entry_read_dispatch<29, 1, -1>;
+template class handler_entry_read_dispatch<30, 1, -1>;
+template class handler_entry_read_dispatch<31, 1, -1>;
+template class handler_entry_read_dispatch<32, 1, -1>;
-template class handler_entry_read_dispatch<25, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 2, 3>;
+template class handler_entry_read_dispatch<26, 2, 3>;
+template class handler_entry_read_dispatch<27, 2, 3>;
+template class handler_entry_read_dispatch<28, 2, 3>;
+template class handler_entry_read_dispatch<29, 2, 3>;
+template class handler_entry_read_dispatch<30, 2, 3>;
+template class handler_entry_read_dispatch<31, 2, 3>;
+template class handler_entry_read_dispatch<32, 2, 3>;
-template class handler_entry_read_dispatch<25, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 2, 0>;
+template class handler_entry_read_dispatch<26, 2, 0>;
+template class handler_entry_read_dispatch<27, 2, 0>;
+template class handler_entry_read_dispatch<28, 2, 0>;
+template class handler_entry_read_dispatch<29, 2, 0>;
+template class handler_entry_read_dispatch<30, 2, 0>;
+template class handler_entry_read_dispatch<31, 2, 0>;
+template class handler_entry_read_dispatch<32, 2, 0>;
-template class handler_entry_read_dispatch<25, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 2, -1>;
+template class handler_entry_read_dispatch<26, 2, -1>;
+template class handler_entry_read_dispatch<27, 2, -1>;
+template class handler_entry_read_dispatch<28, 2, -1>;
+template class handler_entry_read_dispatch<29, 2, -1>;
+template class handler_entry_read_dispatch<30, 2, -1>;
+template class handler_entry_read_dispatch<31, 2, -1>;
+template class handler_entry_read_dispatch<32, 2, -1>;
-template class handler_entry_read_dispatch<25, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 2, -2>;
+template class handler_entry_read_dispatch<26, 2, -2>;
+template class handler_entry_read_dispatch<27, 2, -2>;
+template class handler_entry_read_dispatch<28, 2, -2>;
+template class handler_entry_read_dispatch<29, 2, -2>;
+template class handler_entry_read_dispatch<30, 2, -2>;
+template class handler_entry_read_dispatch<31, 2, -2>;
+template class handler_entry_read_dispatch<32, 2, -2>;
-template class handler_entry_read_dispatch<25, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 3, 0>;
+template class handler_entry_read_dispatch<26, 3, 0>;
+template class handler_entry_read_dispatch<27, 3, 0>;
+template class handler_entry_read_dispatch<28, 3, 0>;
+template class handler_entry_read_dispatch<29, 3, 0>;
+template class handler_entry_read_dispatch<30, 3, 0>;
+template class handler_entry_read_dispatch<31, 3, 0>;
+template class handler_entry_read_dispatch<32, 3, 0>;
-template class handler_entry_read_dispatch<25, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 3, -1>;
+template class handler_entry_read_dispatch<26, 3, -1>;
+template class handler_entry_read_dispatch<27, 3, -1>;
+template class handler_entry_read_dispatch<28, 3, -1>;
+template class handler_entry_read_dispatch<29, 3, -1>;
+template class handler_entry_read_dispatch<30, 3, -1>;
+template class handler_entry_read_dispatch<31, 3, -1>;
+template class handler_entry_read_dispatch<32, 3, -1>;
-template class handler_entry_read_dispatch<25, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 3, -2>;
+template class handler_entry_read_dispatch<26, 3, -2>;
+template class handler_entry_read_dispatch<27, 3, -2>;
+template class handler_entry_read_dispatch<28, 3, -2>;
+template class handler_entry_read_dispatch<29, 3, -2>;
+template class handler_entry_read_dispatch<30, 3, -2>;
+template class handler_entry_read_dispatch<31, 3, -2>;
+template class handler_entry_read_dispatch<32, 3, -2>;
-template class handler_entry_read_dispatch<25, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<25, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<26, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<26, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<27, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<27, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<28, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<28, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<29, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<29, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<31, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<31, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<30, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<30, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_read_dispatch<32, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_dispatch<32, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_dispatch<25, 3, -3>;
+template class handler_entry_read_dispatch<26, 3, -3>;
+template class handler_entry_read_dispatch<27, 3, -3>;
+template class handler_entry_read_dispatch<28, 3, -3>;
+template class handler_entry_read_dispatch<29, 3, -3>;
+template class handler_entry_read_dispatch<30, 3, -3>;
+template class handler_entry_read_dispatch<31, 3, -3>;
+template class handler_entry_read_dispatch<32, 3, -3>;
diff --git a/src/emu/emumem_hedw.h b/src/emu/emumem_hedw.h
index e0ed2c33d81..6600d0b728d 100644
--- a/src/emu/emumem_hedw.h
+++ b/src/emu/emumem_hedw.h
@@ -10,42 +10,42 @@
// dispatches an access among multiple handlers indexed on part of the
// address and when appropriate a selected view
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> class handler_entry_write_dispatch : public handler_entry_write<Width, AddrShift, Endian>
+template<int HighBits, int Width, int AddrShift> class handler_entry_write_dispatch : public handler_entry_write<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- using mapping = typename handler_entry_write<Width, AddrShift, Endian>::mapping;
+ using mapping = typename handler_entry_write<Width, AddrShift>::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, const handler_entry::range &init, handler_entry_write<Width, AddrShift> *handler);
handler_entry_write_dispatch(address_space *space, memory_view &view);
- handler_entry_write_dispatch(handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian> *src);
+ handler_entry_write_dispatch(handler_entry_write_dispatch<HighBits, Width, AddrShift> *src);
~handler_entry_write_dispatch();
void write(offs_t offset, uX data, uX mem_mask) const override;
void *get_ptr(offs_t offset) const override;
- void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift, Endian> *&handler) const override;
+ void lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift> *&handler) const override;
void dump_map(std::vector<memory_entry> &map) const override;
std::string name() const override;
- void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift, Endian> *handler) override;
- void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift, Endian> *handler) override;
- void 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) override;
- void 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) override;
- void populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings) override;
- void populate_passthrough_mirror(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) override;
+ void populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift> *handler) override;
+ void populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift> *handler) override;
+ void 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) override;
+ void 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) override;
+ void populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings) override;
+ void populate_passthrough_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings) override;
void detach(const std::unordered_set<handler_entry *> &handlers) override;
void range_cut_before(offs_t address, int start = COUNT);
void range_cut_after(offs_t address, int start = -1);
void enumerate_references(handler_entry::reflist &refs) const override;
- const handler_entry_write<Width, AddrShift, Endian> *const *get_dispatch() const override;
+ const handler_entry_write<Width, AddrShift> *const *get_dispatch() const override;
void select_a(int slot) override;
void select_u(int slot) override;
- void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift, Endian> **dispatch, handler_entry::range *ranges) override;
- handler_entry_write<Width, AddrShift, Endian> *dup() override;
+ void init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift> **dispatch, handler_entry::range *ranges) override;
+ handler_entry_write<Width, AddrShift> *dup() override;
private:
static constexpr int Level = emu::detail::handler_entry_dispatch_level(HighBits);
@@ -57,10 +57,10 @@ private:
static constexpr offs_t HIGHMASK = make_bitmask<offs_t>(HighBits) ^ LOWMASK;
static constexpr offs_t UPMASK = ~make_bitmask<offs_t>(HighBits);
- class handler_array : public std::array<handler_entry_write<Width, AddrShift, Endian> *, COUNT>
+ class handler_array : public std::array<handler_entry_write<Width, AddrShift> *, COUNT>
{
public:
- using std::array<handler_entry_write<Width, AddrShift, Endian> *, COUNT>::array;
+ using std::array<handler_entry_write<Width, AddrShift> *, COUNT>::array;
handler_array()
{
std::fill(this->begin(), this->end(), nullptr);
@@ -82,22 +82,22 @@ private:
std::vector<handler_array> m_dispatch_array;
std::vector<range_array> m_ranges_array;
- handler_entry_write<Width, AddrShift, Endian> **m_a_dispatch;
+ handler_entry_write<Width, AddrShift> **m_a_dispatch;
handler_entry::range *m_a_ranges;
- handler_entry_write<Width, AddrShift, Endian> **m_u_dispatch;
+ handler_entry_write<Width, AddrShift> **m_u_dispatch;
handler_entry::range *m_u_ranges;
- void populate_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift, Endian> *handler);
- void populate_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift, Endian> *handler);
+ void populate_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift> *handler);
+ void populate_mirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift> *handler);
- void 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);
- void 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);
- void mismatched_patch(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift, Endian> *&target);
+ void 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);
+ void 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);
+ void mismatched_patch(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift> *&target);
- void populate_passthrough_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings);
- 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);
+ void populate_passthrough_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings);
+ 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> *handler, std::vector<mapping> &mappings);
+ void passthrough_patch(handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift> *&target);
};
#endif // MAME_EMU_EMUMEM_HEDW_H
diff --git a/src/emu/emumem_hedw.ipp b/src/emu/emumem_hedw.ipp
index 43ba5768b55..bd122e5d3b4 100644
--- a/src/emu/emumem_hedw.ipp
+++ b/src/emu/emumem_hedw.ipp
@@ -13,12 +13,12 @@
#include "emumem_hedw.h"
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> const handler_entry_write<Width, AddrShift, Endian> *const *handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>::get_dispatch() const
+template<int HighBits, int Width, int AddrShift> const handler_entry_write<Width, AddrShift> *const *handler_entry_write_dispatch<HighBits, Width, AddrShift>::get_dispatch() const
{
return m_a_dispatch;
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>::handler_entry_write_dispatch(address_space *space, const handler_entry::range &init, handler_entry_write<Width, AddrShift, Endian> *handler) : handler_entry_write<Width, AddrShift, Endian>(space, handler_entry::F_DISPATCH), m_view(nullptr)
+template<int HighBits, int Width, int AddrShift> handler_entry_write_dispatch<HighBits, Width, AddrShift>::handler_entry_write_dispatch(address_space *space, const handler_entry::range &init, handler_entry_write<Width, AddrShift> *handler) : handler_entry_write<Width, AddrShift>(space, handler_entry::F_DISPATCH), m_view(nullptr)
{
m_ranges_array.resize(1);
m_dispatch_array.resize(1);
@@ -28,7 +28,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_w<Width, AddrShift, Endian>();
+ handler = space->get_unmap_w<Width, AddrShift>();
handler->ref(COUNT);
for(unsigned int i=0; i != COUNT; i++) {
m_u_dispatch[i] = handler;
@@ -36,12 +36,12 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_en
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>::handler_entry_write_dispatch(address_space *space, memory_view &view) : handler_entry_write<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_write_dispatch<HighBits, Width, AddrShift>::handler_entry_write_dispatch(address_space *space, memory_view &view) : handler_entry_write<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_write_dispatch<HighBits, Width, AddrShift, Endian>::handler_entry_write_dispatch(handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian> *src) : handler_entry_write<Width, AddrShift, Endian>(src->m_space, handler_entry::F_DISPATCH), m_view(nullptr)
+template<int HighBits, int Width, int AddrShift> handler_entry_write_dispatch<HighBits, Width, AddrShift>::handler_entry_write_dispatch(handler_entry_write_dispatch<HighBits, Width, AddrShift> *src) : handler_entry_write<Width, AddrShift>(src->m_space, handler_entry::F_DISPATCH), m_view(nullptr)
{
m_ranges_array.resize(1);
m_dispatch_array.resize(1);
@@ -57,7 +57,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_write_dispatch<HighBits, Width, AddrShift, Endian>::~handler_entry_write_dispatch()
+template<int HighBits, int Width, int AddrShift> handler_entry_write_dispatch<HighBits, Width, AddrShift>::~handler_entry_write_dispatch()
{
for(auto &d : m_dispatch_array)
for(auto p : d)
@@ -65,7 +65,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_write_dispatch<HighBits, Width, AddrShift, Endian>::enumerate_references(handler_entry::reflist &refs) const
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::enumerate_references(handler_entry::reflist &refs) const
{
for(auto &d : m_dispatch_array)
for(auto p : d)
@@ -73,7 +73,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_write_dispatch<HighBits, Width, AddrShift, Endian>::dump_map(std::vector<memory_entry> &map) const
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_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++) {
@@ -111,22 +111,22 @@ 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_write_dispatch<HighBits, Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
- dispatch_write<Level, Width, AddrShift, Endian>(HIGHMASK, offset, data, mem_mask, m_a_dispatch);
+ dispatch_write<Level, Width, AddrShift>(HIGHMASK, offset, data, mem_mask, m_a_dispatch);
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void *handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>::get_ptr(offs_t offset) const
+template<int HighBits, int Width, int AddrShift> void *handler_entry_write_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_write_dispatch<HighBits, Width, AddrShift, Endian>::name() const
+template<int HighBits, int Width, int AddrShift> std::string handler_entry_write_dispatch<HighBits, Width, AddrShift>::name() const
{
return m_view ? "view" :"dispatch";
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift, Endian> *&handler) const
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::lookup(offs_t address, offs_t &start, offs_t &end, handler_entry_write<Width, AddrShift> *&handler) const
{
offs_t slot = (address >> LowBits) & BITMASK;
auto h = m_a_dispatch[slot];
@@ -139,11 +139,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_write_dispatch<HighBits, Width, AddrShift, Endian>::range_cut_before(offs_t address, int start)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_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_write_dispatch<LowBits, Width, AddrShift, Endian> *>(m_u_dispatch[start])->range_cut_before(address);
+ static_cast<handler_entry_write_dispatch<LowBits, Width, AddrShift> *>(m_u_dispatch[start])->range_cut_before(address);
break;
}
if(m_u_ranges[start].end <= address)
@@ -152,11 +152,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_write_dispatch<HighBits, Width, AddrShift, Endian>::range_cut_after(offs_t address, int start)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_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_write_dispatch<LowBits, Width, AddrShift, Endian> *>(m_u_dispatch[start])->range_cut_after(address);
+ static_cast<handler_entry_write_dispatch<LowBits, Width, AddrShift> *>(m_u_dispatch[start])->range_cut_after(address);
break;
}
if(m_u_ranges[start].start >= address)
@@ -165,20 +165,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_write_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_write<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::populate_nomirror_subdispatch(offs_t entry, offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<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_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_write_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_write_dispatch<HighBits, Width, AddrShift, Endian>::populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::populate_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write<Width, AddrShift> *handler)
{
offs_t start_entry = (start & HIGHMASK) >> LowBits;
offs_t end_entry = (end & HIGHMASK) >> LowBits;
@@ -232,20 +232,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_write_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_write<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_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_write<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_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_write_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);
}
}
-template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>::populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift, Endian> *handler)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::populate_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write<Width, AddrShift> *handler)
{
offs_t hmirror = mirror & HIGHMASK;
offs_t lmirror = mirror & LOWMASK;
@@ -276,11 +276,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_write_dispatch<HighBits, Width, AddrShift, Endian>::mismatched_patch(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift, Endian> *&target)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::mismatched_patch(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 rkey, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift> *&target)
{
u8 ukey = descriptor.rkey_to_ukey(rkey);
- handler_entry_write<Width, AddrShift, Endian> *original = target->is_units() ? target : nullptr;
- handler_entry_write<Width, AddrShift, Endian> *replacement = nullptr;
+ handler_entry_write<Width, AddrShift> *original = target->is_units() ? target : nullptr;
+ handler_entry_write<Width, AddrShift> *replacement = nullptr;
for(const auto &p : mappings)
if(p.ukey == ukey && p.original == original) {
replacement = p.patched;
@@ -288,9 +288,9 @@ template<int HighBits, int Width, int AddrShift, endianness_t Endian> void handl
}
if(!replacement) {
if(original)
- replacement = new handler_entry_write_units<Width, AddrShift, Endian>(descriptor, ukey, static_cast<handler_entry_write_units<Width, AddrShift, Endian> *>(original));
+ replacement = new handler_entry_write_units<Width, AddrShift>(descriptor, ukey, static_cast<handler_entry_write_units<Width, AddrShift> *>(original));
else
- replacement = new handler_entry_write_units<Width, AddrShift, Endian>(descriptor, ukey, this->m_space);
+ replacement = new handler_entry_write_units<Width, AddrShift>(descriptor, ukey, this->m_space);
mappings.emplace_back(mapping{ original, replacement, ukey });
} else
@@ -299,20 +299,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_write_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_write_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_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_write_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_write_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_write_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 & HIGHMASK) >> LowBits;
offs_t end_entry = (end & HIGHMASK) >> LowBits;
@@ -369,20 +369,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_write_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_write_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_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_write_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_write_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_write_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;
@@ -410,10 +410,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_write_dispatch<HighBits, Width, AddrShift, Endian>::passthrough_patch(handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift, Endian> *&target)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::passthrough_patch(handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings, handler_entry_write<Width, AddrShift> *&target)
{
- handler_entry_write<Width, AddrShift, Endian> *original = target;
- handler_entry_write<Width, AddrShift, Endian> *replacement = nullptr;
+ handler_entry_write<Width, AddrShift> *original = target;
+ handler_entry_write<Width, AddrShift> *replacement = nullptr;
for(const auto &p : mappings)
if(p.original == original) {
replacement = p.patched;
@@ -428,20 +428,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_write_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_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_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_write_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_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_write_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_write_dispatch<HighBits, Width, AddrShift, Endian>::populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::populate_passthrough_nomirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings)
{
offs_t start_entry = (start & HIGHMASK) >> LowBits;
offs_t end_entry = (end & HIGHMASK) >> LowBits;
@@ -486,20 +486,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_write_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_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_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_write_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_write_dispatch<LowBits, Width, AddrShift, Endian>(this->m_space, m_u_ranges[entry], cur);
+ auto subdispatch = new handler_entry_write_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_write_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_write_passthrough<Width, AddrShift, Endian> *handler, std::vector<mapping> &mappings)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::populate_passthrough_mirror(offs_t start, offs_t end, offs_t ostart, offs_t oend, offs_t mirror, handler_entry_write_passthrough<Width, AddrShift> *handler, std::vector<mapping> &mappings)
{
offs_t hmirror = mirror & HIGHMASK;
offs_t lmirror = mirror & LOWMASK;
@@ -526,7 +526,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_write_dispatch<HighBits, Width, AddrShift, Endian>::detach(const std::unordered_set<handler_entry *> &handlers)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_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()) {
@@ -537,7 +537,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_write_passthrough<Width, AddrShift, Endian> *>(m_u_dispatch[i]);
+ auto np = static_cast<handler_entry_write_passthrough<Width, AddrShift> *>(m_u_dispatch[i]);
if(handlers.find(np) != handlers.end()) {
m_u_dispatch[i] = np->get_subhandler();
@@ -549,7 +549,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_write_dispatch<HighBits, Width, AddrShift, Endian>::init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift, Endian> **dispatch, handler_entry::range *ranges)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::init_handlers(offs_t start_entry, offs_t end_entry, u32 lowbits, handler_entry_write<Width, AddrShift> **dispatch, handler_entry::range *ranges)
{
if(!m_view)
fatalerror("init_handlers called on non-view handler_entry_write_dispatch.");
@@ -589,7 +589,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_write_dispatch<HighBits, Width, AddrShift, Endian>::select_a(int id)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::select_a(int id)
{
u32 i = id+1;
if(i >= m_dispatch_array.size())
@@ -599,7 +599,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_write_dispatch<HighBits, Width, AddrShift, Endian>::select_u(int id)
+template<int HighBits, int Width, int AddrShift> void handler_entry_write_dispatch<HighBits, Width, AddrShift>::select_u(int id)
{
u32 i = id+1;
if(i > m_dispatch_array.size())
@@ -626,14 +626,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_write<Width, AddrShift, Endian> *handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>::dup()
+template<int HighBits, int Width, int AddrShift> handler_entry_write<Width, AddrShift> *handler_entry_write_dispatch<HighBits, Width, AddrShift>::dup()
{
if(m_view) {
handler_entry::ref();
return this;
}
- return new handler_entry_write_dispatch<HighBits, Width, AddrShift, Endian>(this);
+ return new handler_entry_write_dispatch<HighBits, Width, AddrShift>(this);
}
#endif // MAME_EMU_EMUMEM_HEDW_IPP
diff --git a/src/emu/emumem_hedw0.cpp b/src/emu/emumem_hedw0.cpp
index 67244fc3044..33a8c17e91d 100644
--- a/src/emu/emumem_hedw0.cpp
+++ b/src/emu/emumem_hedw0.cpp
@@ -5,229 +5,122 @@
#include "emumem_hedw.ipp"
-template class handler_entry_write_dispatch< 0, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 0, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 1, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 0, 0, 1>;
+template class handler_entry_write_dispatch< 1, 0, 1>;
+template class handler_entry_write_dispatch< 2, 0, 1>;
+template class handler_entry_write_dispatch< 3, 0, 1>;
+template class handler_entry_write_dispatch< 4, 0, 1>;
+template class handler_entry_write_dispatch< 5, 0, 1>;
+template class handler_entry_write_dispatch< 6, 0, 1>;
+template class handler_entry_write_dispatch< 7, 0, 1>;
+template class handler_entry_write_dispatch< 8, 0, 1>;
-template class handler_entry_write_dispatch< 0, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 0, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 1, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 0, 0, 0>;
+template class handler_entry_write_dispatch< 1, 0, 0>;
+template class handler_entry_write_dispatch< 2, 0, 0>;
+template class handler_entry_write_dispatch< 3, 0, 0>;
+template class handler_entry_write_dispatch< 4, 0, 0>;
+template class handler_entry_write_dispatch< 5, 0, 0>;
+template class handler_entry_write_dispatch< 6, 0, 0>;
+template class handler_entry_write_dispatch< 7, 0, 0>;
+template class handler_entry_write_dispatch< 8, 0, 0>;
-template class handler_entry_write_dispatch< 0, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 0, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 1, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 0, 1, 3>;
+template class handler_entry_write_dispatch< 1, 1, 3>;
+template class handler_entry_write_dispatch< 2, 1, 3>;
+template class handler_entry_write_dispatch< 3, 1, 3>;
+template class handler_entry_write_dispatch< 4, 1, 3>;
+template class handler_entry_write_dispatch< 5, 1, 3>;
+template class handler_entry_write_dispatch< 6, 1, 3>;
+template class handler_entry_write_dispatch< 7, 1, 3>;
+template class handler_entry_write_dispatch< 8, 1, 3>;
-template class handler_entry_write_dispatch< 1, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 1, 1, 0>;
+template class handler_entry_write_dispatch< 2, 1, 0>;
+template class handler_entry_write_dispatch< 3, 1, 0>;
+template class handler_entry_write_dispatch< 4, 1, 0>;
+template class handler_entry_write_dispatch< 5, 1, 0>;
+template class handler_entry_write_dispatch< 6, 1, 0>;
+template class handler_entry_write_dispatch< 7, 1, 0>;
+template class handler_entry_write_dispatch< 8, 1, 0>;
-template class handler_entry_write_dispatch< 0, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 0, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 1, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 0, 1, -1>;
+template class handler_entry_write_dispatch< 1, 1, -1>;
+template class handler_entry_write_dispatch< 2, 1, -1>;
+template class handler_entry_write_dispatch< 3, 1, -1>;
+template class handler_entry_write_dispatch< 4, 1, -1>;
+template class handler_entry_write_dispatch< 5, 1, -1>;
+template class handler_entry_write_dispatch< 6, 1, -1>;
+template class handler_entry_write_dispatch< 7, 1, -1>;
+template class handler_entry_write_dispatch< 8, 1, -1>;
-template class handler_entry_write_dispatch< 0, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 0, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 1, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 0, 2, 3>;
+template class handler_entry_write_dispatch< 1, 2, 3>;
+template class handler_entry_write_dispatch< 2, 2, 3>;
+template class handler_entry_write_dispatch< 3, 2, 3>;
+template class handler_entry_write_dispatch< 4, 2, 3>;
+template class handler_entry_write_dispatch< 5, 2, 3>;
+template class handler_entry_write_dispatch< 6, 2, 3>;
+template class handler_entry_write_dispatch< 7, 2, 3>;
+template class handler_entry_write_dispatch< 8, 2, 3>;
-template class handler_entry_write_dispatch< 2, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 2, 2, 0>;
+template class handler_entry_write_dispatch< 3, 2, 0>;
+template class handler_entry_write_dispatch< 4, 2, 0>;
+template class handler_entry_write_dispatch< 5, 2, 0>;
+template class handler_entry_write_dispatch< 6, 2, 0>;
+template class handler_entry_write_dispatch< 7, 2, 0>;
+template class handler_entry_write_dispatch< 8, 2, 0>;
-template class handler_entry_write_dispatch< 1, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 1, 2, -1>;
+template class handler_entry_write_dispatch< 2, 2, -1>;
+template class handler_entry_write_dispatch< 3, 2, -1>;
+template class handler_entry_write_dispatch< 4, 2, -1>;
+template class handler_entry_write_dispatch< 5, 2, -1>;
+template class handler_entry_write_dispatch< 6, 2, -1>;
+template class handler_entry_write_dispatch< 7, 2, -1>;
+template class handler_entry_write_dispatch< 8, 2, -1>;
-template class handler_entry_write_dispatch< 0, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 0, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 1, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 0, 2, -2>;
+template class handler_entry_write_dispatch< 1, 2, -2>;
+template class handler_entry_write_dispatch< 2, 2, -2>;
+template class handler_entry_write_dispatch< 3, 2, -2>;
+template class handler_entry_write_dispatch< 4, 2, -2>;
+template class handler_entry_write_dispatch< 5, 2, -2>;
+template class handler_entry_write_dispatch< 6, 2, -2>;
+template class handler_entry_write_dispatch< 7, 2, -2>;
+template class handler_entry_write_dispatch< 8, 2, -2>;
-template class handler_entry_write_dispatch< 3, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 3, 3, 0>;
+template class handler_entry_write_dispatch< 4, 3, 0>;
+template class handler_entry_write_dispatch< 5, 3, 0>;
+template class handler_entry_write_dispatch< 6, 3, 0>;
+template class handler_entry_write_dispatch< 7, 3, 0>;
+template class handler_entry_write_dispatch< 8, 3, 0>;
-template class handler_entry_write_dispatch< 2, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 2, 3, -1>;
+template class handler_entry_write_dispatch< 3, 3, -1>;
+template class handler_entry_write_dispatch< 4, 3, -1>;
+template class handler_entry_write_dispatch< 5, 3, -1>;
+template class handler_entry_write_dispatch< 6, 3, -1>;
+template class handler_entry_write_dispatch< 7, 3, -1>;
+template class handler_entry_write_dispatch< 8, 3, -1>;
-template class handler_entry_write_dispatch< 1, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 1, 3, -2>;
+template class handler_entry_write_dispatch< 2, 3, -2>;
+template class handler_entry_write_dispatch< 3, 3, -2>;
+template class handler_entry_write_dispatch< 4, 3, -2>;
+template class handler_entry_write_dispatch< 5, 3, -2>;
+template class handler_entry_write_dispatch< 6, 3, -2>;
+template class handler_entry_write_dispatch< 7, 3, -2>;
+template class handler_entry_write_dispatch< 8, 3, -2>;
-template class handler_entry_write_dispatch< 0, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 0, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 1, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 1, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 2, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 2, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 3, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 3, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 4, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 4, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 5, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 5, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 6, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 6, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 7, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 7, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch< 8, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 8, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 0, 3, -3>;
+template class handler_entry_write_dispatch< 1, 3, -3>;
+template class handler_entry_write_dispatch< 2, 3, -3>;
+template class handler_entry_write_dispatch< 3, 3, -3>;
+template class handler_entry_write_dispatch< 4, 3, -3>;
+template class handler_entry_write_dispatch< 5, 3, -3>;
+template class handler_entry_write_dispatch< 6, 3, -3>;
+template class handler_entry_write_dispatch< 7, 3, -3>;
+template class handler_entry_write_dispatch< 8, 3, -3>;
diff --git a/src/emu/emumem_hedw1.cpp b/src/emu/emumem_hedw1.cpp
index 7626d522018..ea81f92663b 100644
--- a/src/emu/emumem_hedw1.cpp
+++ b/src/emu/emumem_hedw1.cpp
@@ -4,223 +4,119 @@
#include "emu.h"
#include "emumem_hedw.ipp"
-template class handler_entry_write_dispatch< 9, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 0, 1>;
+template class handler_entry_write_dispatch<10, 0, 1>;
+template class handler_entry_write_dispatch<11, 0, 1>;
+template class handler_entry_write_dispatch<12, 0, 1>;
+template class handler_entry_write_dispatch<13, 0, 1>;
+template class handler_entry_write_dispatch<14, 0, 1>;
+template class handler_entry_write_dispatch<15, 0, 1>;
+template class handler_entry_write_dispatch<16, 0, 1>;
-template class handler_entry_write_dispatch< 9, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 0, 0>;
+template class handler_entry_write_dispatch<10, 0, 0>;
+template class handler_entry_write_dispatch<11, 0, 0>;
+template class handler_entry_write_dispatch<12, 0, 0>;
+template class handler_entry_write_dispatch<13, 0, 0>;
+template class handler_entry_write_dispatch<14, 0, 0>;
+template class handler_entry_write_dispatch<15, 0, 0>;
+template class handler_entry_write_dispatch<16, 0, 0>;
-template class handler_entry_write_dispatch< 9, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 1, 3>;
+template class handler_entry_write_dispatch<10, 1, 3>;
+template class handler_entry_write_dispatch<11, 1, 3>;
+template class handler_entry_write_dispatch<12, 1, 3>;
+template class handler_entry_write_dispatch<13, 1, 3>;
+template class handler_entry_write_dispatch<14, 1, 3>;
+template class handler_entry_write_dispatch<15, 1, 3>;
+template class handler_entry_write_dispatch<16, 1, 3>;
-template class handler_entry_write_dispatch< 9, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 1, 0>;
+template class handler_entry_write_dispatch<10, 1, 0>;
+template class handler_entry_write_dispatch<11, 1, 0>;
+template class handler_entry_write_dispatch<12, 1, 0>;
+template class handler_entry_write_dispatch<13, 1, 0>;
+template class handler_entry_write_dispatch<14, 1, 0>;
+template class handler_entry_write_dispatch<15, 1, 0>;
+template class handler_entry_write_dispatch<16, 1, 0>;
-template class handler_entry_write_dispatch< 9, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 1, -1>;
+template class handler_entry_write_dispatch<10, 1, -1>;
+template class handler_entry_write_dispatch<11, 1, -1>;
+template class handler_entry_write_dispatch<12, 1, -1>;
+template class handler_entry_write_dispatch<13, 1, -1>;
+template class handler_entry_write_dispatch<14, 1, -1>;
+template class handler_entry_write_dispatch<15, 1, -1>;
+template class handler_entry_write_dispatch<16, 1, -1>;
-template class handler_entry_write_dispatch< 9, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 2, 3>;
+template class handler_entry_write_dispatch<10, 2, 3>;
+template class handler_entry_write_dispatch<11, 2, 3>;
+template class handler_entry_write_dispatch<12, 2, 3>;
+template class handler_entry_write_dispatch<13, 2, 3>;
+template class handler_entry_write_dispatch<14, 2, 3>;
+template class handler_entry_write_dispatch<15, 2, 3>;
+template class handler_entry_write_dispatch<16, 2, 3>;
-template class handler_entry_write_dispatch< 9, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 2, 0>;
+template class handler_entry_write_dispatch<10, 2, 0>;
+template class handler_entry_write_dispatch<11, 2, 0>;
+template class handler_entry_write_dispatch<12, 2, 0>;
+template class handler_entry_write_dispatch<13, 2, 0>;
+template class handler_entry_write_dispatch<14, 2, 0>;
+template class handler_entry_write_dispatch<15, 2, 0>;
+template class handler_entry_write_dispatch<16, 2, 0>;
-template class handler_entry_write_dispatch< 9, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 2, -1>;
+template class handler_entry_write_dispatch<10, 2, -1>;
+template class handler_entry_write_dispatch<11, 2, -1>;
+template class handler_entry_write_dispatch<12, 2, -1>;
+template class handler_entry_write_dispatch<13, 2, -1>;
+template class handler_entry_write_dispatch<14, 2, -1>;
+template class handler_entry_write_dispatch<15, 2, -1>;
+template class handler_entry_write_dispatch<16, 2, -1>;
-template class handler_entry_write_dispatch< 9, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 2, -2>;
+template class handler_entry_write_dispatch<10, 2, -2>;
+template class handler_entry_write_dispatch<11, 2, -2>;
+template class handler_entry_write_dispatch<12, 2, -2>;
+template class handler_entry_write_dispatch<13, 2, -2>;
+template class handler_entry_write_dispatch<14, 2, -2>;
+template class handler_entry_write_dispatch<15, 2, -2>;
+template class handler_entry_write_dispatch<16, 2, -2>;
-template class handler_entry_write_dispatch< 9, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 3, 0>;
+template class handler_entry_write_dispatch<10, 3, 0>;
+template class handler_entry_write_dispatch<11, 3, 0>;
+template class handler_entry_write_dispatch<12, 3, 0>;
+template class handler_entry_write_dispatch<13, 3, 0>;
+template class handler_entry_write_dispatch<14, 3, 0>;
+template class handler_entry_write_dispatch<15, 3, 0>;
+template class handler_entry_write_dispatch<16, 3, 0>;
-template class handler_entry_write_dispatch< 9, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 3, -1>;
+template class handler_entry_write_dispatch<10, 3, -1>;
+template class handler_entry_write_dispatch<11, 3, -1>;
+template class handler_entry_write_dispatch<12, 3, -1>;
+template class handler_entry_write_dispatch<13, 3, -1>;
+template class handler_entry_write_dispatch<14, 3, -1>;
+template class handler_entry_write_dispatch<15, 3, -1>;
+template class handler_entry_write_dispatch<16, 3, -1>;
-template class handler_entry_write_dispatch< 9, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 3, -2>;
+template class handler_entry_write_dispatch<10, 3, -2>;
+template class handler_entry_write_dispatch<11, 3, -2>;
+template class handler_entry_write_dispatch<12, 3, -2>;
+template class handler_entry_write_dispatch<13, 3, -2>;
+template class handler_entry_write_dispatch<14, 3, -2>;
+template class handler_entry_write_dispatch<15, 3, -2>;
+template class handler_entry_write_dispatch<16, 3, -2>;
-template class handler_entry_write_dispatch< 9, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch< 9, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<10, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<10, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<11, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<11, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<12, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<12, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<13, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<13, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<14, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<14, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<15, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<15, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<16, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<16, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch< 9, 3, -3>;
+template class handler_entry_write_dispatch<10, 3, -3>;
+template class handler_entry_write_dispatch<11, 3, -3>;
+template class handler_entry_write_dispatch<12, 3, -3>;
+template class handler_entry_write_dispatch<13, 3, -3>;
+template class handler_entry_write_dispatch<14, 3, -3>;
+template class handler_entry_write_dispatch<15, 3, -3>;
+template class handler_entry_write_dispatch<16, 3, -3>;
diff --git a/src/emu/emumem_hedw2.cpp b/src/emu/emumem_hedw2.cpp
index f36532ce3b8..7ffb7603f01 100644
--- a/src/emu/emumem_hedw2.cpp
+++ b/src/emu/emumem_hedw2.cpp
@@ -4,223 +4,119 @@
#include "emu.h"
#include "emumem_hedw.ipp"
-template class handler_entry_write_dispatch<17, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 0, 1>;
+template class handler_entry_write_dispatch<18, 0, 1>;
+template class handler_entry_write_dispatch<19, 0, 1>;
+template class handler_entry_write_dispatch<20, 0, 1>;
+template class handler_entry_write_dispatch<21, 0, 1>;
+template class handler_entry_write_dispatch<22, 0, 1>;
+template class handler_entry_write_dispatch<23, 0, 1>;
+template class handler_entry_write_dispatch<24, 0, 1>;
-template class handler_entry_write_dispatch<17, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 0, 0>;
+template class handler_entry_write_dispatch<18, 0, 0>;
+template class handler_entry_write_dispatch<19, 0, 0>;
+template class handler_entry_write_dispatch<20, 0, 0>;
+template class handler_entry_write_dispatch<21, 0, 0>;
+template class handler_entry_write_dispatch<22, 0, 0>;
+template class handler_entry_write_dispatch<23, 0, 0>;
+template class handler_entry_write_dispatch<24, 0, 0>;
-template class handler_entry_write_dispatch<17, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 1, 3>;
+template class handler_entry_write_dispatch<18, 1, 3>;
+template class handler_entry_write_dispatch<19, 1, 3>;
+template class handler_entry_write_dispatch<20, 1, 3>;
+template class handler_entry_write_dispatch<21, 1, 3>;
+template class handler_entry_write_dispatch<22, 1, 3>;
+template class handler_entry_write_dispatch<23, 1, 3>;
+template class handler_entry_write_dispatch<24, 1, 3>;
-template class handler_entry_write_dispatch<17, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 1, 0>;
+template class handler_entry_write_dispatch<18, 1, 0>;
+template class handler_entry_write_dispatch<19, 1, 0>;
+template class handler_entry_write_dispatch<20, 1, 0>;
+template class handler_entry_write_dispatch<21, 1, 0>;
+template class handler_entry_write_dispatch<22, 1, 0>;
+template class handler_entry_write_dispatch<23, 1, 0>;
+template class handler_entry_write_dispatch<24, 1, 0>;
-template class handler_entry_write_dispatch<17, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 1, -1>;
+template class handler_entry_write_dispatch<18, 1, -1>;
+template class handler_entry_write_dispatch<19, 1, -1>;
+template class handler_entry_write_dispatch<20, 1, -1>;
+template class handler_entry_write_dispatch<21, 1, -1>;
+template class handler_entry_write_dispatch<22, 1, -1>;
+template class handler_entry_write_dispatch<23, 1, -1>;
+template class handler_entry_write_dispatch<24, 1, -1>;
-template class handler_entry_write_dispatch<17, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 2, 3>;
+template class handler_entry_write_dispatch<18, 2, 3>;
+template class handler_entry_write_dispatch<19, 2, 3>;
+template class handler_entry_write_dispatch<20, 2, 3>;
+template class handler_entry_write_dispatch<21, 2, 3>;
+template class handler_entry_write_dispatch<22, 2, 3>;
+template class handler_entry_write_dispatch<23, 2, 3>;
+template class handler_entry_write_dispatch<24, 2, 3>;
-template class handler_entry_write_dispatch<17, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 2, 0>;
+template class handler_entry_write_dispatch<18, 2, 0>;
+template class handler_entry_write_dispatch<19, 2, 0>;
+template class handler_entry_write_dispatch<20, 2, 0>;
+template class handler_entry_write_dispatch<21, 2, 0>;
+template class handler_entry_write_dispatch<22, 2, 0>;
+template class handler_entry_write_dispatch<23, 2, 0>;
+template class handler_entry_write_dispatch<24, 2, 0>;
-template class handler_entry_write_dispatch<17, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 2, -1>;
+template class handler_entry_write_dispatch<18, 2, -1>;
+template class handler_entry_write_dispatch<19, 2, -1>;
+template class handler_entry_write_dispatch<20, 2, -1>;
+template class handler_entry_write_dispatch<21, 2, -1>;
+template class handler_entry_write_dispatch<22, 2, -1>;
+template class handler_entry_write_dispatch<23, 2, -1>;
+template class handler_entry_write_dispatch<24, 2, -1>;
-template class handler_entry_write_dispatch<17, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 2, -2>;
+template class handler_entry_write_dispatch<18, 2, -2>;
+template class handler_entry_write_dispatch<19, 2, -2>;
+template class handler_entry_write_dispatch<20, 2, -2>;
+template class handler_entry_write_dispatch<21, 2, -2>;
+template class handler_entry_write_dispatch<22, 2, -2>;
+template class handler_entry_write_dispatch<23, 2, -2>;
+template class handler_entry_write_dispatch<24, 2, -2>;
-template class handler_entry_write_dispatch<17, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 3, 0>;
+template class handler_entry_write_dispatch<18, 3, 0>;
+template class handler_entry_write_dispatch<19, 3, 0>;
+template class handler_entry_write_dispatch<20, 3, 0>;
+template class handler_entry_write_dispatch<21, 3, 0>;
+template class handler_entry_write_dispatch<22, 3, 0>;
+template class handler_entry_write_dispatch<23, 3, 0>;
+template class handler_entry_write_dispatch<24, 3, 0>;
-template class handler_entry_write_dispatch<17, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 3, -1>;
+template class handler_entry_write_dispatch<18, 3, -1>;
+template class handler_entry_write_dispatch<19, 3, -1>;
+template class handler_entry_write_dispatch<20, 3, -1>;
+template class handler_entry_write_dispatch<21, 3, -1>;
+template class handler_entry_write_dispatch<22, 3, -1>;
+template class handler_entry_write_dispatch<23, 3, -1>;
+template class handler_entry_write_dispatch<24, 3, -1>;
-template class handler_entry_write_dispatch<17, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 3, -2>;
+template class handler_entry_write_dispatch<18, 3, -2>;
+template class handler_entry_write_dispatch<19, 3, -2>;
+template class handler_entry_write_dispatch<20, 3, -2>;
+template class handler_entry_write_dispatch<21, 3, -2>;
+template class handler_entry_write_dispatch<22, 3, -2>;
+template class handler_entry_write_dispatch<23, 3, -2>;
+template class handler_entry_write_dispatch<24, 3, -2>;
-template class handler_entry_write_dispatch<17, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<17, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<18, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<18, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<19, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<19, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<20, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<20, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<21, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<21, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<22, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<22, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<23, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<23, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<24, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<24, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<17, 3, -3>;
+template class handler_entry_write_dispatch<18, 3, -3>;
+template class handler_entry_write_dispatch<19, 3, -3>;
+template class handler_entry_write_dispatch<20, 3, -3>;
+template class handler_entry_write_dispatch<21, 3, -3>;
+template class handler_entry_write_dispatch<22, 3, -3>;
+template class handler_entry_write_dispatch<23, 3, -3>;
+template class handler_entry_write_dispatch<24, 3, -3>;
diff --git a/src/emu/emumem_hedw3.cpp b/src/emu/emumem_hedw3.cpp
index 53057a42341..b0846d8198b 100644
--- a/src/emu/emumem_hedw3.cpp
+++ b/src/emu/emumem_hedw3.cpp
@@ -5,223 +5,119 @@
#include "emumem_hedw.ipp"
-template class handler_entry_write_dispatch<25, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 0, 1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 0, 1>;
+template class handler_entry_write_dispatch<26, 0, 1>;
+template class handler_entry_write_dispatch<27, 0, 1>;
+template class handler_entry_write_dispatch<28, 0, 1>;
+template class handler_entry_write_dispatch<29, 0, 1>;
+template class handler_entry_write_dispatch<30, 0, 1>;
+template class handler_entry_write_dispatch<31, 0, 1>;
+template class handler_entry_write_dispatch<32, 0, 1>;
-template class handler_entry_write_dispatch<25, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 0, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 0, 0>;
+template class handler_entry_write_dispatch<26, 0, 0>;
+template class handler_entry_write_dispatch<27, 0, 0>;
+template class handler_entry_write_dispatch<28, 0, 0>;
+template class handler_entry_write_dispatch<29, 0, 0>;
+template class handler_entry_write_dispatch<30, 0, 0>;
+template class handler_entry_write_dispatch<31, 0, 0>;
+template class handler_entry_write_dispatch<32, 0, 0>;
-template class handler_entry_write_dispatch<25, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 1, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 1, 3>;
+template class handler_entry_write_dispatch<26, 1, 3>;
+template class handler_entry_write_dispatch<27, 1, 3>;
+template class handler_entry_write_dispatch<28, 1, 3>;
+template class handler_entry_write_dispatch<29, 1, 3>;
+template class handler_entry_write_dispatch<30, 1, 3>;
+template class handler_entry_write_dispatch<31, 1, 3>;
+template class handler_entry_write_dispatch<32, 1, 3>;
-template class handler_entry_write_dispatch<25, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 1, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 1, 0>;
+template class handler_entry_write_dispatch<26, 1, 0>;
+template class handler_entry_write_dispatch<27, 1, 0>;
+template class handler_entry_write_dispatch<28, 1, 0>;
+template class handler_entry_write_dispatch<29, 1, 0>;
+template class handler_entry_write_dispatch<30, 1, 0>;
+template class handler_entry_write_dispatch<31, 1, 0>;
+template class handler_entry_write_dispatch<32, 1, 0>;
-template class handler_entry_write_dispatch<25, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 1, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 1, -1>;
+template class handler_entry_write_dispatch<26, 1, -1>;
+template class handler_entry_write_dispatch<27, 1, -1>;
+template class handler_entry_write_dispatch<28, 1, -1>;
+template class handler_entry_write_dispatch<29, 1, -1>;
+template class handler_entry_write_dispatch<30, 1, -1>;
+template class handler_entry_write_dispatch<31, 1, -1>;
+template class handler_entry_write_dispatch<32, 1, -1>;
-template class handler_entry_write_dispatch<25, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 2, 3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 2, 3>;
+template class handler_entry_write_dispatch<26, 2, 3>;
+template class handler_entry_write_dispatch<27, 2, 3>;
+template class handler_entry_write_dispatch<28, 2, 3>;
+template class handler_entry_write_dispatch<29, 2, 3>;
+template class handler_entry_write_dispatch<30, 2, 3>;
+template class handler_entry_write_dispatch<31, 2, 3>;
+template class handler_entry_write_dispatch<32, 2, 3>;
-template class handler_entry_write_dispatch<25, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 2, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 2, 0>;
+template class handler_entry_write_dispatch<26, 2, 0>;
+template class handler_entry_write_dispatch<27, 2, 0>;
+template class handler_entry_write_dispatch<28, 2, 0>;
+template class handler_entry_write_dispatch<29, 2, 0>;
+template class handler_entry_write_dispatch<30, 2, 0>;
+template class handler_entry_write_dispatch<31, 2, 0>;
+template class handler_entry_write_dispatch<32, 2, 0>;
-template class handler_entry_write_dispatch<25, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 2, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 2, -1>;
+template class handler_entry_write_dispatch<26, 2, -1>;
+template class handler_entry_write_dispatch<27, 2, -1>;
+template class handler_entry_write_dispatch<28, 2, -1>;
+template class handler_entry_write_dispatch<29, 2, -1>;
+template class handler_entry_write_dispatch<30, 2, -1>;
+template class handler_entry_write_dispatch<31, 2, -1>;
+template class handler_entry_write_dispatch<32, 2, -1>;
-template class handler_entry_write_dispatch<25, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 2, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 2, -2>;
+template class handler_entry_write_dispatch<26, 2, -2>;
+template class handler_entry_write_dispatch<27, 2, -2>;
+template class handler_entry_write_dispatch<28, 2, -2>;
+template class handler_entry_write_dispatch<29, 2, -2>;
+template class handler_entry_write_dispatch<30, 2, -2>;
+template class handler_entry_write_dispatch<31, 2, -2>;
+template class handler_entry_write_dispatch<32, 2, -2>;
-template class handler_entry_write_dispatch<25, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 3, 0, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 3, 0>;
+template class handler_entry_write_dispatch<26, 3, 0>;
+template class handler_entry_write_dispatch<27, 3, 0>;
+template class handler_entry_write_dispatch<28, 3, 0>;
+template class handler_entry_write_dispatch<29, 3, 0>;
+template class handler_entry_write_dispatch<30, 3, 0>;
+template class handler_entry_write_dispatch<31, 3, 0>;
+template class handler_entry_write_dispatch<32, 3, 0>;
-template class handler_entry_write_dispatch<25, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 3, -1, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 3, -1>;
+template class handler_entry_write_dispatch<26, 3, -1>;
+template class handler_entry_write_dispatch<27, 3, -1>;
+template class handler_entry_write_dispatch<28, 3, -1>;
+template class handler_entry_write_dispatch<29, 3, -1>;
+template class handler_entry_write_dispatch<30, 3, -1>;
+template class handler_entry_write_dispatch<31, 3, -1>;
+template class handler_entry_write_dispatch<32, 3, -1>;
-template class handler_entry_write_dispatch<25, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 3, -2, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 3, -2>;
+template class handler_entry_write_dispatch<26, 3, -2>;
+template class handler_entry_write_dispatch<27, 3, -2>;
+template class handler_entry_write_dispatch<28, 3, -2>;
+template class handler_entry_write_dispatch<29, 3, -2>;
+template class handler_entry_write_dispatch<30, 3, -2>;
+template class handler_entry_write_dispatch<31, 3, -2>;
+template class handler_entry_write_dispatch<32, 3, -2>;
-template class handler_entry_write_dispatch<25, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<25, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<26, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<26, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<27, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<27, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<28, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<28, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<29, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<29, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<31, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<31, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<30, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<30, 3, -3, ENDIANNESS_BIG>;
-template class handler_entry_write_dispatch<32, 3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_dispatch<32, 3, -3, ENDIANNESS_BIG>;
+template class handler_entry_write_dispatch<25, 3, -3>;
+template class handler_entry_write_dispatch<26, 3, -3>;
+template class handler_entry_write_dispatch<27, 3, -3>;
+template class handler_entry_write_dispatch<28, 3, -3>;
+template class handler_entry_write_dispatch<29, 3, -3>;
+template class handler_entry_write_dispatch<30, 3, -3>;
+template class handler_entry_write_dispatch<31, 3, -3>;
+template class handler_entry_write_dispatch<32, 3, -3>;
diff --git a/src/emu/emumem_hem.cpp b/src/emu/emumem_hem.cpp
index f8cba179d20..d7a41e10e9b 100644
--- a/src/emu/emumem_hem.cpp
+++ b/src/emu/emumem_hem.cpp
@@ -5,44 +5,39 @@
#include "emumem_hea.h"
#include "emumem_hem.h"
-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
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_memory<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
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
+template<int Width, int AddrShift> void *handler_entry_read_memory<Width, AddrShift>::get_ptr(offs_t offset) const
{
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
+template<int Width, int AddrShift> std::string handler_entry_read_memory<Width, AddrShift>::name() const
{
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
+template<int Width, int AddrShift> void handler_entry_write_memory<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
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
+template<> void handler_entry_write_memory<0, 0>::write(offs_t offset, u8 data, u8 mem_mask) const
{
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 - 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
+template<int Width, int AddrShift> void *handler_entry_write_memory<Width, AddrShift>::get_ptr(offs_t offset) const
{
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
+template<int Width, int AddrShift> std::string handler_entry_write_memory<Width, AddrShift>::name() const
{
return util::string_format("memory@%x", this->m_address_base);
}
@@ -51,155 +46,98 @@ 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
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_memory_bank<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
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
+template<int Width, int AddrShift> void *handler_entry_read_memory_bank<Width, AddrShift>::get_ptr(offs_t offset) const
{
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
+template<int Width, int AddrShift> std::string handler_entry_read_memory_bank<Width, AddrShift>::name() const
{
return m_bank.name();
}
-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
+template<int Width, int AddrShift> void handler_entry_write_memory_bank<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
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 - 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
+template<> void handler_entry_write_memory_bank<0, 0>::write(offs_t offset, u8 data, u8 mem_mask) const
{
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
+template<int Width, int AddrShift> void *handler_entry_write_memory_bank<Width, AddrShift>::get_ptr(offs_t offset) const
{
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
+template<int Width, int AddrShift> std::string handler_entry_write_memory_bank<Width, AddrShift>::name() const
{
return m_bank.name();
}
-template class handler_entry_read_memory<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_memory<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_memory<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_memory<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory<3, -3, ENDIANNESS_BIG>;
-
-
-template class handler_entry_read_memory_bank<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_memory_bank<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_memory_bank<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_memory_bank<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_memory_bank<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_memory_bank<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_memory<0, 1>;
+template class handler_entry_read_memory<0, 0>;
+template class handler_entry_read_memory<1, 3>;
+template class handler_entry_read_memory<1, 0>;
+template class handler_entry_read_memory<1, -1>;
+template class handler_entry_read_memory<2, 3>;
+template class handler_entry_read_memory<2, 0>;
+template class handler_entry_read_memory<2, -1>;
+template class handler_entry_read_memory<2, -2>;
+template class handler_entry_read_memory<3, 0>;
+template class handler_entry_read_memory<3, -1>;
+template class handler_entry_read_memory<3, -2>;
+template class handler_entry_read_memory<3, -3>;
+
+template class handler_entry_write_memory<0, 1>;
+template class handler_entry_write_memory<0, 0>;
+template class handler_entry_write_memory<1, 3>;
+template class handler_entry_write_memory<1, 0>;
+template class handler_entry_write_memory<1, -1>;
+template class handler_entry_write_memory<2, 3>;
+template class handler_entry_write_memory<2, 0>;
+template class handler_entry_write_memory<2, -1>;
+template class handler_entry_write_memory<2, -2>;
+template class handler_entry_write_memory<3, 0>;
+template class handler_entry_write_memory<3, -1>;
+template class handler_entry_write_memory<3, -2>;
+template class handler_entry_write_memory<3, -3>;
+
+
+template class handler_entry_read_memory_bank<0, 1>;
+template class handler_entry_read_memory_bank<0, 0>;
+template class handler_entry_read_memory_bank<1, 3>;
+template class handler_entry_read_memory_bank<1, 0>;
+template class handler_entry_read_memory_bank<1, -1>;
+template class handler_entry_read_memory_bank<2, 3>;
+template class handler_entry_read_memory_bank<2, 0>;
+template class handler_entry_read_memory_bank<2, -1>;
+template class handler_entry_read_memory_bank<2, -2>;
+template class handler_entry_read_memory_bank<3, 0>;
+template class handler_entry_read_memory_bank<3, -1>;
+template class handler_entry_read_memory_bank<3, -2>;
+template class handler_entry_read_memory_bank<3, -3>;
+
+template class handler_entry_write_memory_bank<0, 1>;
+template class handler_entry_write_memory_bank<0, 0>;
+template class handler_entry_write_memory_bank<1, 3>;
+template class handler_entry_write_memory_bank<1, 0>;
+template class handler_entry_write_memory_bank<1, -1>;
+template class handler_entry_write_memory_bank<2, 3>;
+template class handler_entry_write_memory_bank<2, 0>;
+template class handler_entry_write_memory_bank<2, -1>;
+template class handler_entry_write_memory_bank<2, -2>;
+template class handler_entry_write_memory_bank<3, 0>;
+template class handler_entry_write_memory_bank<3, -1>;
+template class handler_entry_write_memory_bank<3, -2>;
+template class handler_entry_write_memory_bank<3, -3>;
diff --git a/src/emu/emumem_hem.h b/src/emu/emumem_hem.h
index 7b1379b7f9e..a7d4653cb63 100644
--- a/src/emu/emumem_hem.h
+++ b/src/emu/emumem_hem.h
@@ -9,12 +9,12 @@
// Accesses fixed memory (non-banked rom or ram)
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_memory : public handler_entry_read_address<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_memory : public handler_entry_read_address<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, void *base) : handler_entry_read_address<Width, AddrShift>(space, 0), m_base(reinterpret_cast<uX *>(base)) {}
~handler_entry_read_memory() = default;
uX read(offs_t offset, uX mem_mask) const override;
@@ -26,12 +26,12 @@ private:
uX *m_base;
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_memory : public handler_entry_write_address<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_memory : public handler_entry_write_address<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, void *base) : handler_entry_write_address<Width, AddrShift>(space, 0), m_base(reinterpret_cast<uX *>(base)) {}
~handler_entry_write_memory() = default;
void write(offs_t offset, uX data, uX mem_mask) const override;
@@ -48,12 +48,12 @@ private:
// Accesses banked memory, associated to a memory_bank
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_memory_bank : public handler_entry_read_address<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_memory_bank : public handler_entry_read_address<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, memory_bank &bank) : handler_entry_read_address<Width, AddrShift>(space, 0), m_bank(bank) {}
~handler_entry_read_memory_bank() = default;
uX read(offs_t offset, uX mem_mask) const override;
@@ -65,12 +65,12 @@ private:
memory_bank &m_bank;
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_memory_bank : public handler_entry_write_address<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_memory_bank : public handler_entry_write_address<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(address_space *space, memory_bank &bank) : handler_entry_write_address<Width, AddrShift>(space, 0), m_bank(bank) {}
~handler_entry_write_memory_bank() = default;
void write(offs_t offset, uX data, uX mem_mask) const override;
diff --git a/src/emu/emumem_hep.cpp b/src/emu/emumem_hep.cpp
index 38cf89b4ec3..203ff5d5c9e 100644
--- a/src/emu/emumem_hep.cpp
+++ b/src/emu/emumem_hep.cpp
@@ -4,7 +4,7 @@
#include "emu.h"
#include "emumem_hep.h"
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_passthrough<Width, AddrShift, Endian>::~handler_entry_read_passthrough()
+template<int Width, int AddrShift> handler_entry_read_passthrough<Width, AddrShift>::~handler_entry_read_passthrough()
{
if(m_next) {
m_mph.remove_handler(this);
@@ -12,11 +12,11 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_passt
}
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read_passthrough<Width, AddrShift, Endian>::detach(const std::unordered_set<handler_entry *> &handlers)
+template<int Width, int AddrShift> void handler_entry_read_passthrough<Width, AddrShift>::detach(const std::unordered_set<handler_entry *> &handlers)
{
if(!m_next->is_passthrough())
return;
- auto np = static_cast<handler_entry_read_passthrough<Width, AddrShift, Endian> *>(m_next);
+ auto np = static_cast<handler_entry_read_passthrough<Width, AddrShift> *>(m_next);
if(handlers.find(np) != handlers.end()) {
m_next = np->get_subhandler();
@@ -27,7 +27,7 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read_
np->detach(handlers);
}
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_passthrough<Width, AddrShift, Endian>::~handler_entry_write_passthrough()
+template<int Width, int AddrShift> handler_entry_write_passthrough<Width, AddrShift>::~handler_entry_write_passthrough()
{
if(m_next) {
m_mph.remove_handler(this);
@@ -35,11 +35,11 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_pass
}
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_passthrough<Width, AddrShift, Endian>::detach(const std::unordered_set<handler_entry *> &handlers)
+template<int Width, int AddrShift> void handler_entry_write_passthrough<Width, AddrShift>::detach(const std::unordered_set<handler_entry *> &handlers)
{
if(!m_next->is_passthrough())
return;
- auto np = static_cast<handler_entry_write_passthrough<Width, AddrShift, Endian> *>(m_next);
+ auto np = static_cast<handler_entry_write_passthrough<Width, AddrShift> *>(m_next);
if(handlers.find(np) != handlers.end()) {
m_next = np->get_subhandler();
@@ -50,56 +50,30 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write
np->detach(handlers);
}
-template class handler_entry_read_passthrough<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_passthrough<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_passthrough<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_passthrough<0, 1>;
+template class handler_entry_read_passthrough<0, 0>;
+template class handler_entry_read_passthrough<1, 3>;
+template class handler_entry_read_passthrough<1, 0>;
+template class handler_entry_read_passthrough<1, -1>;
+template class handler_entry_read_passthrough<2, 3>;
+template class handler_entry_read_passthrough<2, 0>;
+template class handler_entry_read_passthrough<2, -1>;
+template class handler_entry_read_passthrough<2, -2>;
+template class handler_entry_read_passthrough<3, 0>;
+template class handler_entry_read_passthrough<3, -1>;
+template class handler_entry_read_passthrough<3, -2>;
+template class handler_entry_read_passthrough<3, -3>;
-template class handler_entry_write_passthrough<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_passthrough<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_passthrough<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_write_passthrough<0, 1>;
+template class handler_entry_write_passthrough<0, 0>;
+template class handler_entry_write_passthrough<1, 3>;
+template class handler_entry_write_passthrough<1, 0>;
+template class handler_entry_write_passthrough<1, -1>;
+template class handler_entry_write_passthrough<2, 3>;
+template class handler_entry_write_passthrough<2, 0>;
+template class handler_entry_write_passthrough<2, -1>;
+template class handler_entry_write_passthrough<2, -2>;
+template class handler_entry_write_passthrough<3, 0>;
+template class handler_entry_write_passthrough<3, -1>;
+template class handler_entry_write_passthrough<3, -2>;
+template class handler_entry_write_passthrough<3, -3>;
diff --git a/src/emu/emumem_hep.h b/src/emu/emumem_hep.h
index 08b453c9fb0..60fc422b72e 100644
--- a/src/emu/emumem_hep.h
+++ b/src/emu/emumem_hep.h
@@ -5,44 +5,44 @@
// parent class for handlers which want to tap the access and usually pass it on to another handler
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_passthrough : public handler_entry_read<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_passthrough : public handler_entry_read<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- handler_entry_read_passthrough(address_space *space, memory_passthrough_handler &mph) : handler_entry_read<Width, AddrShift, Endian>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(nullptr) {}
+ handler_entry_read_passthrough(address_space *space, memory_passthrough_handler &mph) : handler_entry_read<Width, AddrShift>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(nullptr) {}
~handler_entry_read_passthrough();
- virtual handler_entry_read_passthrough<Width, AddrShift, Endian> *instantiate(handler_entry_read<Width, AddrShift, Endian> *next) const = 0;
+ virtual handler_entry_read_passthrough<Width, AddrShift> *instantiate(handler_entry_read<Width, AddrShift> *next) const = 0;
- handler_entry_read<Width, AddrShift, Endian> *get_subhandler() const { return m_next; }
+ handler_entry_read<Width, AddrShift> *get_subhandler() const { return m_next; }
void detach(const std::unordered_set<handler_entry *> &handlers) override;
protected:
memory_passthrough_handler &m_mph;
- handler_entry_read<Width, AddrShift, Endian> *m_next;
+ handler_entry_read<Width, AddrShift> *m_next;
- handler_entry_read_passthrough(address_space *space, memory_passthrough_handler &mph, handler_entry_read<Width, AddrShift, Endian> *next) : handler_entry_read<Width, AddrShift, Endian>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(next) { next->ref(); mph.add_handler(this); }
+ handler_entry_read_passthrough(address_space *space, memory_passthrough_handler &mph, handler_entry_read<Width, AddrShift> *next) : handler_entry_read<Width, AddrShift>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(next) { next->ref(); mph.add_handler(this); }
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_passthrough : public handler_entry_write<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_passthrough : public handler_entry_write<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- handler_entry_write_passthrough(address_space *space, memory_passthrough_handler &mph) : handler_entry_write<Width, AddrShift, Endian>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(nullptr) {}
+ handler_entry_write_passthrough(address_space *space, memory_passthrough_handler &mph) : handler_entry_write<Width, AddrShift>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(nullptr) {}
~handler_entry_write_passthrough();
- virtual handler_entry_write_passthrough<Width, AddrShift, Endian> *instantiate(handler_entry_write<Width, AddrShift, Endian> *next) const = 0;
+ virtual handler_entry_write_passthrough<Width, AddrShift> *instantiate(handler_entry_write<Width, AddrShift> *next) const = 0;
- handler_entry_write<Width, AddrShift, Endian> *get_subhandler() const { return m_next; }
+ handler_entry_write<Width, AddrShift> *get_subhandler() const { return m_next; }
void detach(const std::unordered_set<handler_entry *> &handlers) override;
protected:
memory_passthrough_handler &m_mph;
- handler_entry_write<Width, AddrShift, Endian> *m_next;
+ handler_entry_write<Width, AddrShift> *m_next;
- handler_entry_write_passthrough(address_space *space, memory_passthrough_handler &mph, handler_entry_write<Width, AddrShift, Endian> *next) : handler_entry_write<Width, AddrShift, Endian>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(next) { next->ref(); mph.add_handler(this); }
+ handler_entry_write_passthrough(address_space *space, memory_passthrough_handler &mph, handler_entry_write<Width, AddrShift> *next) : handler_entry_write<Width, AddrShift>(space, handler_entry::F_PASSTHROUGH), m_mph(mph), m_next(next) { next->ref(); mph.add_handler(this); }
};
diff --git a/src/emu/emumem_het.cpp b/src/emu/emumem_het.cpp
index dd49492c85b..c9363695cdc 100644
--- a/src/emu/emumem_het.cpp
+++ b/src/emu/emumem_het.cpp
@@ -5,7 +5,7 @@
#include "emumem_hep.h"
#include "emumem_het.h"
-template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_tap<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_tap<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
this->ref();
@@ -16,18 +16,18 @@ template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::ha
return data;
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_tap<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_read_tap<Width, AddrShift>::name() const
{
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
+template<int Width, int AddrShift> handler_entry_read_tap<Width, AddrShift> *handler_entry_read_tap<Width, AddrShift>::instantiate(handler_entry_read<Width, AddrShift> *next) const
{
- return new handler_entry_read_tap<Width, AddrShift, Endian>(this->m_space, this->m_mph, next, m_name, m_tap);
+ return new handler_entry_read_tap<Width, AddrShift>(this->m_space, this->m_mph, next, m_name, m_tap);
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_tap<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
+template<int Width, int AddrShift> void handler_entry_write_tap<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
this->ref();
@@ -37,69 +37,43 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write
this->unref();
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_tap<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_write_tap<Width, AddrShift>::name() const
{
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
+template<int Width, int AddrShift> handler_entry_write_tap<Width, AddrShift> *handler_entry_write_tap<Width, AddrShift>::instantiate(handler_entry_write<Width, AddrShift> *next) const
{
- return new handler_entry_write_tap<Width, AddrShift, Endian>(this->m_space, this->m_mph, next, m_name, m_tap);
+ return new handler_entry_write_tap<Width, AddrShift>(this->m_space, this->m_mph, next, m_name, m_tap);
}
-template class handler_entry_read_tap<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_tap<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_tap<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_tap<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_tap<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_tap<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_tap<0, 1>;
+template class handler_entry_read_tap<0, 0>;
+template class handler_entry_read_tap<1, 3>;
+template class handler_entry_read_tap<1, 0>;
+template class handler_entry_read_tap<1, -1>;
+template class handler_entry_read_tap<2, 3>;
+template class handler_entry_read_tap<2, 0>;
+template class handler_entry_read_tap<2, -1>;
+template class handler_entry_read_tap<2, -2>;
+template class handler_entry_read_tap<3, 0>;
+template class handler_entry_read_tap<3, -1>;
+template class handler_entry_read_tap<3, -2>;
+template class handler_entry_read_tap<3, -3>;
+
+template class handler_entry_write_tap<0, 1>;
+template class handler_entry_write_tap<0, 0>;
+template class handler_entry_write_tap<1, 3>;
+template class handler_entry_write_tap<1, 0>;
+template class handler_entry_write_tap<1, -1>;
+template class handler_entry_write_tap<2, 3>;
+template class handler_entry_write_tap<2, 0>;
+template class handler_entry_write_tap<2, -1>;
+template class handler_entry_write_tap<2, -2>;
+template class handler_entry_write_tap<3, 0>;
+template class handler_entry_write_tap<3, -1>;
+template class handler_entry_write_tap<3, -2>;
+template class handler_entry_write_tap<3, -3>;
diff --git a/src/emu/emumem_het.h b/src/emu/emumem_het.h
index 1c7ca565485..ac717b839a6 100644
--- a/src/emu/emumem_het.h
+++ b/src/emu/emumem_het.h
@@ -9,46 +9,46 @@
// handler which tap on a bus access and possibly change the data value through a std::function
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_tap : public handler_entry_read_passthrough<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_tap : public handler_entry_read_passthrough<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(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>(space, mph), m_name(name), m_tap(std::move(tap)) {}
~handler_entry_read_tap() = default;
uX read(offs_t offset, uX mem_mask) const override;
std::string name() const override;
- handler_entry_read_tap<Width, AddrShift, Endian> *instantiate(handler_entry_read<Width, AddrShift, Endian> *next) const override;
+ handler_entry_read_tap<Width, AddrShift> *instantiate(handler_entry_read<Width, AddrShift> *next) const override;
protected:
std::string m_name;
std::function<void (offs_t offset, uX &data, uX mem_mask)> m_tap;
- handler_entry_read_tap(address_space *space, memory_passthrough_handler &mph, handler_entry_read<Width, AddrShift, Endian> *next, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap) : handler_entry_read_passthrough<Width, AddrShift, Endian>(space, mph, next), m_name(name), m_tap(tap) {}
+ handler_entry_read_tap(address_space *space, memory_passthrough_handler &mph, handler_entry_read<Width, AddrShift> *next, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap) : handler_entry_read_passthrough<Width, AddrShift>(space, mph, next), m_name(name), m_tap(tap) {}
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_tap : public handler_entry_write_passthrough<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_tap : public handler_entry_write_passthrough<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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(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>(space, mph), m_name(name), m_tap(std::move(tap)) {}
~handler_entry_write_tap() = default;
void write(offs_t offset, uX data, uX mem_mask) const override;
std::string name() const override;
- handler_entry_write_tap<Width, AddrShift, Endian> *instantiate(handler_entry_write<Width, AddrShift, Endian> *next) const override;
+ handler_entry_write_tap<Width, AddrShift> *instantiate(handler_entry_write<Width, AddrShift> *next) const override;
protected:
std::string m_name;
std::function<void (offs_t offset, uX &data, uX mem_mask)> m_tap;
- 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) {}
+ handler_entry_write_tap(address_space *space, memory_passthrough_handler &mph, handler_entry_write<Width, AddrShift> *next, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap) : handler_entry_write_passthrough<Width, AddrShift>(space, mph, next), m_name(name), m_tap(tap) {}
};
#endif // MAME_EMU_EMUMEM_HET_H
diff --git a/src/emu/emumem_heu.cpp b/src/emu/emumem_heu.cpp
index ac61986650b..d78a4a8acd4 100644
--- a/src/emu/emumem_heu.cpp
+++ b/src/emu/emumem_heu.cpp
@@ -7,8 +7,8 @@
#include "emumem_heu.h"
-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, handler_entry_read_units::F_UNITS),
+template<int Width, int AddrShift> handler_entry_read_units<Width, AddrShift>::handler_entry_read_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, address_space *space) :
+ handler_entry_read<Width, AddrShift>(space, handler_entry_read_units::F_UNITS),
m_subunits(0)
{
const auto &entries = descriptor.get_entries_for_key(ukey);
@@ -16,8 +16,8 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units
std::sort(m_subunit_infos, m_subunit_infos + m_subunits, [](const subunit_info &a, const subunit_info &b) { return a.m_offset < b.m_offset; });
}
-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, handler_entry_read_units::F_UNITS),
+template<int Width, int AddrShift> handler_entry_read_units<Width, AddrShift>::handler_entry_read_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, const handler_entry_read_units *src) :
+ handler_entry_read<Width, AddrShift>(src->m_space, handler_entry_read_units::F_UNITS),
m_subunits(0)
{
uX fullmask = 0;
@@ -36,46 +36,46 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units
std::sort(m_subunit_infos, m_subunit_infos + m_subunits, [](const subunit_info &a, const subunit_info &b) { return a.m_offset < b.m_offset; });
}
-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, handler_entry_read_units::F_UNITS),
+template<int Width, int AddrShift> handler_entry_read_units<Width, AddrShift>::handler_entry_read_units(const handler_entry_read_units *src) :
+ handler_entry_read<Width, AddrShift>(src->m_space, handler_entry_read_units::F_UNITS),
m_subunits(src->m_subunits)
{
for(u32 i=0; i != src->m_subunits; i++) {
m_subunit_infos[i] = src->m_subunit_infos[i];
- m_subunit_infos[i].m_handler = static_cast<handler_entry_write<Width, AddrShift, Endian> *>(m_subunit_infos[i].m_handler)->dup();
+ m_subunit_infos[i].m_handler = static_cast<handler_entry_write<Width, AddrShift> *>(m_subunit_infos[i].m_handler)->dup();
}
}
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_read_units<Width, AddrShift, Endian>::~handler_entry_read_units()
+template<int Width, int AddrShift> handler_entry_read_units<Width, AddrShift>::~handler_entry_read_units()
{
for(u32 i=0; i != m_subunits; i++)
m_subunit_infos[i].m_handler->unref();
}
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_read<Width, AddrShift, Endian> *handler_entry_read_units<Width, AddrShift, Endian>::dup()
+template<int Width, int AddrShift> handler_entry_read<Width, AddrShift> *handler_entry_read_units<Width, AddrShift>::dup()
{
- return new handler_entry_read_units<Width, AddrShift, Endian>(this);
+ return new handler_entry_read_units<Width, AddrShift>(this);
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read_units<Width, AddrShift, Endian>::enumerate_references(handler_entry::reflist &refs) const
+template<int Width, int AddrShift> void handler_entry_read_units<Width, AddrShift>::enumerate_references(handler_entry::reflist &refs) const
{
for(u32 i=0; i != m_subunits; i++)
refs.add(m_subunit_infos[i].m_handler);
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_read_units<Width, AddrShift, Endian>::fill(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift, Endian>::entry> &entries)
+template<int Width, int AddrShift> void handler_entry_read_units<Width, AddrShift>::fill(const memory_units_descriptor<Width, AddrShift> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift>::entry> &entries)
{
handler_entry *handler = descriptor.get_subunit_handler();
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_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() };
m_unmap = this->m_space->unmap();
for(int i = 0; i < m_subunits; i++)
m_unmap &= ~m_subunit_infos[i].m_dmask;
}
-template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_units<Width, AddrShift, Endian>::read(offs_t offset, uX mem_mask) const
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_units<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
this->ref();
@@ -86,22 +86,13 @@ template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::ha
offs_t aoffset = (si.m_ashift >= 0 ? offset >> si.m_ashift : offset << si.m_ashift) + si.m_offset;
switch(si.m_width) {
case 0:
- if(si.m_endian == ENDIANNESS_LITTLE)
- result |= uX(static_cast<handler_entry_read<0, 0, ENDIANNESS_LITTLE> *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
- else
- result |= uX(static_cast<handler_entry_read<0, 0, ENDIANNESS_BIG > *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
+ result |= uX(static_cast<handler_entry_read<0, 0> *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
break;
case 1:
- if(si.m_endian == ENDIANNESS_LITTLE)
- result |= uX(static_cast<handler_entry_read<1, -1, ENDIANNESS_LITTLE> *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
- else
- result |= uX(static_cast<handler_entry_read<1, -1, ENDIANNESS_BIG > *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
+ result |= uX(static_cast<handler_entry_read<1, -1> *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
break;
case 2:
- if(si.m_endian == ENDIANNESS_LITTLE)
- result |= uX(static_cast<handler_entry_read<2, -2, ENDIANNESS_LITTLE> *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
- else
- result |= uX(static_cast<handler_entry_read<2, -2, ENDIANNESS_BIG > *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
+ result |= uX(static_cast<handler_entry_read<2, -2> *>(si.m_handler)->read(aoffset, mem_mask >> si.m_dshift)) << si.m_dshift;
break;
default:
abort();
@@ -113,7 +104,7 @@ template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::ha
return result;
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_units<Width, AddrShift, Endian>::m2r(typename emu::detail::handler_entry_size<Width>::uX mask)
+template<int Width, int AddrShift> std::string handler_entry_read_units<Width, AddrShift>::m2r(typename emu::detail::handler_entry_size<Width>::uX mask)
{
constexpr u32 mbits = 8*sizeof(uX);
u32 start, end;
@@ -124,7 +115,7 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
return util::string_format("%d-%d", end, start);
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_units<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_read_units<Width, AddrShift>::name() const
{
std::string result;
@@ -141,8 +132,8 @@ 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, handler_entry_write_units::F_UNITS),
+template<int Width, int AddrShift> handler_entry_write_units<Width, AddrShift>::handler_entry_write_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, address_space *space) :
+ handler_entry_write<Width, AddrShift>(space, handler_entry_write_units::F_UNITS),
m_subunits(0)
{
const auto &entries = descriptor.get_entries_for_key(ukey);
@@ -150,8 +141,8 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_unit
std::sort(m_subunit_infos, m_subunit_infos + m_subunits, [](const subunit_info &a, const subunit_info &b) { return a.m_offset < b.m_offset; });
}
-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, handler_entry_write_units::F_UNITS),
+template<int Width, int AddrShift> handler_entry_write_units<Width, AddrShift>::handler_entry_write_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, const handler_entry_write_units<Width, AddrShift> *src) :
+ handler_entry_write<Width, AddrShift>(src->m_space, handler_entry_write_units::F_UNITS),
m_subunits(0)
{
uX fullmask = 0;
@@ -170,42 +161,42 @@ template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_unit
std::sort(m_subunit_infos, m_subunit_infos + m_subunits, [](const subunit_info &a, const subunit_info &b) { return a.m_offset < b.m_offset; });
}
-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, handler_entry_write_units::F_UNITS),
+template<int Width, int AddrShift> handler_entry_write_units<Width, AddrShift>::handler_entry_write_units(const handler_entry_write_units *src) :
+ handler_entry_write<Width, AddrShift>(src->m_space, handler_entry_write_units::F_UNITS),
m_subunits(src->m_subunits)
{
for(u32 i=0; i != src->m_subunits; i++) {
m_subunit_infos[i] = src->m_subunit_infos[i];
- m_subunit_infos[i].m_handler = static_cast<handler_entry_write<Width, AddrShift, Endian> *>(m_subunit_infos[i].m_handler)->dup();
+ m_subunit_infos[i].m_handler = static_cast<handler_entry_write<Width, AddrShift> *>(m_subunit_infos[i].m_handler)->dup();
}
}
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_write_units<Width, AddrShift, Endian>::~handler_entry_write_units()
+template<int Width, int AddrShift> handler_entry_write_units<Width, AddrShift>::~handler_entry_write_units()
{
for(u32 i=0; i != m_subunits; i++)
m_subunit_infos[i].m_handler->unref();
}
-template<int Width, int AddrShift, endianness_t Endian> handler_entry_write<Width, AddrShift, Endian> *handler_entry_write_units<Width, AddrShift, Endian>::dup()
+template<int Width, int AddrShift> handler_entry_write<Width, AddrShift> *handler_entry_write_units<Width, AddrShift>::dup()
{
- return new handler_entry_write_units<Width, AddrShift, Endian>(this);
+ return new handler_entry_write_units<Width, AddrShift>(this);
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_units<Width, AddrShift, Endian>::enumerate_references(handler_entry::reflist &refs) const
+template<int Width, int AddrShift> void handler_entry_write_units<Width, AddrShift>::enumerate_references(handler_entry::reflist &refs) const
{
for(u32 i=0; i != m_subunits; i++)
refs.add(m_subunit_infos[i].m_handler);
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_units<Width, AddrShift, Endian>::fill(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift, Endian>::entry> &entries)
+template<int Width, int AddrShift> void handler_entry_write_units<Width, AddrShift>::fill(const memory_units_descriptor<Width, AddrShift> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift>::entry> &entries)
{
handler_entry *handler = descriptor.get_subunit_handler();
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_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() };
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_units<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
+template<int Width, int AddrShift> void handler_entry_write_units<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
this->ref();
@@ -215,22 +206,13 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write
offs_t aoffset = (si.m_ashift >= 0 ? offset >> si.m_ashift : offset << si.m_ashift) + si.m_offset;
switch(si.m_width) {
case 0:
- if(si.m_endian == ENDIANNESS_LITTLE)
- static_cast<handler_entry_write<0, 0, ENDIANNESS_LITTLE> *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
- else
- static_cast<handler_entry_write<0, 0, ENDIANNESS_BIG > *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
+ static_cast<handler_entry_write<0, 0> *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
break;
case 1:
- if(si.m_endian == ENDIANNESS_LITTLE)
- static_cast<handler_entry_write<1, -1, ENDIANNESS_LITTLE> *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
- else
- static_cast<handler_entry_write<1, -1, ENDIANNESS_BIG > *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
+ static_cast<handler_entry_write<1, -1> *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
break;
case 2:
- if(si.m_endian == ENDIANNESS_LITTLE)
- static_cast<handler_entry_write<2, -2, ENDIANNESS_LITTLE> *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
- else
- static_cast<handler_entry_write<2, -2, ENDIANNESS_BIG > *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
+ static_cast<handler_entry_write<2, -2> *>(si.m_handler)->write(aoffset, data >> si.m_dshift, mem_mask >> si.m_dshift);
break;
default:
abort();
@@ -242,7 +224,7 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_units<Width, AddrShift, Endian>::m2r(typename emu::detail::handler_entry_size<Width>::uX mask)
+template<int Width, int AddrShift> std::string handler_entry_write_units<Width, AddrShift>::m2r(typename emu::detail::handler_entry_size<Width>::uX mask)
{
constexpr u32 mbits = 8*sizeof(uX);
u32 start, end;
@@ -253,7 +235,7 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
return util::string_format("%d-%d", end, start);
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_units<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_write_units<Width, AddrShift>::name() const
{
std::string result;
@@ -268,56 +250,30 @@ template<int Width, int AddrShift, endianness_t Endian> std::string handler_entr
}
-template class handler_entry_read_units<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_units<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_units<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_units<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_units<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_units<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_units<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_units<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_units<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_units<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_units<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_units<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_units<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_units<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_units<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_units<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_units<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_units<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_units<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_units<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_units<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_units<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_units<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_units<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_units<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_units<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_units<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_units<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_units<0, 1>;
+template class handler_entry_read_units<0, 0>;
+template class handler_entry_read_units<1, 3>;
+template class handler_entry_read_units<1, 0>;
+template class handler_entry_read_units<1, -1>;
+template class handler_entry_read_units<2, 3>;
+template class handler_entry_read_units<2, 0>;
+template class handler_entry_read_units<2, -1>;
+template class handler_entry_read_units<2, -2>;
+template class handler_entry_read_units<3, 0>;
+template class handler_entry_read_units<3, -1>;
+template class handler_entry_read_units<3, -2>;
+template class handler_entry_read_units<3, -3>;
+
+template class handler_entry_write_units<0, 1>;
+template class handler_entry_write_units<0, 0>;
+template class handler_entry_write_units<1, 3>;
+template class handler_entry_write_units<1, 0>;
+template class handler_entry_write_units<1, -1>;
+template class handler_entry_write_units<2, 3>;
+template class handler_entry_write_units<2, 0>;
+template class handler_entry_write_units<2, -1>;
+template class handler_entry_write_units<2, -2>;
+template class handler_entry_write_units<3, 0>;
+template class handler_entry_write_units<3, -1>;
+template class handler_entry_write_units<3, -2>;
+template class handler_entry_write_units<3, -3>;
diff --git a/src/emu/emumem_heu.h b/src/emu/emumem_heu.h
index 8814f4119a1..541f96bc556 100644
--- a/src/emu/emumem_heu.h
+++ b/src/emu/emumem_heu.h
@@ -9,13 +9,13 @@
// merges/splits an access among multiple handlers (unitmask support)
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_units : public handler_entry_read<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_units : public handler_entry_read<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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);
+ handler_entry_read_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, address_space *space);
+ handler_entry_read_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, const handler_entry_read_units *src);
handler_entry_read_units(const handler_entry_read_units *src);
~handler_entry_read_units();
@@ -24,7 +24,7 @@ public:
std::string name() const override;
void enumerate_references(handler_entry::reflist &refs) const override;
- handler_entry_read<Width, AddrShift, Endian> *dup() override;
+ handler_entry_read<Width, AddrShift> *dup() override;
private:
static constexpr u32 SUBUNIT_COUNT = 1 << Width;
@@ -40,24 +40,23 @@ private:
u8 m_dshift; // data shift of the subunit
u8 m_width; // access width (0..3)
- u8 m_endian; // endianness
};
subunit_info m_subunit_infos[SUBUNIT_COUNT]; // subunit information
uX m_unmap; // "unmapped" value to add to reads
u8 m_subunits; // number of subunits
- void fill(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift, Endian>::entry> &entries);
+ void fill(const memory_units_descriptor<Width, AddrShift> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift>::entry> &entries);
static std::string m2r(uX mask);
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_units : public handler_entry_write<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_units : public handler_entry_write<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- 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);
+ handler_entry_write_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, address_space *space);
+ handler_entry_write_units(const memory_units_descriptor<Width, AddrShift> &descriptor, u8 ukey, const handler_entry_write_units<Width, AddrShift> *src);
handler_entry_write_units(const handler_entry_write_units *src);
~handler_entry_write_units();
@@ -66,7 +65,7 @@ public:
std::string name() const override;
void enumerate_references(handler_entry::reflist &refs) const override;
- handler_entry_write<Width, AddrShift, Endian> *dup() override;
+ handler_entry_write<Width, AddrShift> *dup() override;
private:
static constexpr u32 SUBUNIT_COUNT = 1 << Width;
@@ -82,13 +81,12 @@ private:
u8 m_dshift; // data shift of the subunit
u8 m_width; // access width (0..3)
- u8 m_endian; // endianness
};
subunit_info m_subunit_infos[SUBUNIT_COUNT]; // subunit information
u8 m_subunits; // number of subunits
- void fill(const memory_units_descriptor<Width, AddrShift, Endian> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift, Endian>::entry> &entries);
+ void fill(const memory_units_descriptor<Width, AddrShift> &descriptor, const std::vector<typename memory_units_descriptor<Width, AddrShift>::entry> &entries);
static std::string m2r(uX mask);
};
diff --git a/src/emu/emumem_heun.cpp b/src/emu/emumem_heun.cpp
index 2fcbdebfa1b..f81b95dac19 100644
--- a/src/emu/emumem_heun.cpp
+++ b/src/emu/emumem_heun.cpp
@@ -5,7 +5,7 @@
#include "emumem_hea.h"
#include "emumem_heun.h"
-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
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_unmapped<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
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()
@@ -17,13 +17,13 @@ template<int Width, int AddrShift, endianness_t Endian> typename emu::detail::ha
return this->m_space->unmap();
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_unmapped<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_read_unmapped<Width, AddrShift>::name() const
{
return "unmapped";
}
-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
+template<int Width, int AddrShift> void handler_entry_write_unmapped<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask)const
{
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()
@@ -35,7 +35,7 @@ template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write
2 << Width, mem_mask);
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_unmapped<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_write_unmapped<Width, AddrShift>::name() const
{
return "unmapped";
}
@@ -43,132 +43,80 @@ 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
+template<int Width, int AddrShift> typename emu::detail::handler_entry_size<Width>::uX handler_entry_read_nop<Width, AddrShift>::read(offs_t offset, uX mem_mask) const
{
return this->m_space->unmap();
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_read_nop<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_read_nop<Width, AddrShift>::name() const
{
return "nop";
}
-template<int Width, int AddrShift, endianness_t Endian> void handler_entry_write_nop<Width, AddrShift, Endian>::write(offs_t offset, uX data, uX mem_mask) const
+template<int Width, int AddrShift> void handler_entry_write_nop<Width, AddrShift>::write(offs_t offset, uX data, uX mem_mask) const
{
}
-template<int Width, int AddrShift, endianness_t Endian> std::string handler_entry_write_nop<Width, AddrShift, Endian>::name() const
+template<int Width, int AddrShift> std::string handler_entry_write_nop<Width, AddrShift>::name() const
{
return "nop";
}
-template class handler_entry_read_unmapped<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_unmapped<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_unmapped<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_unmapped<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_unmapped<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_unmapped<3, -3, ENDIANNESS_BIG>;
-
-
-template class handler_entry_read_nop<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_read_nop<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_read_nop<3, -3, ENDIANNESS_BIG>;
-
-template class handler_entry_write_nop<0, 1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<0, 1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<0, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<0, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<1, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<1, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<1, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<1, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<1, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<1, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, 3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, 3, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<2, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<2, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, 0, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, 0, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, -1, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, -1, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, -2, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, -2, ENDIANNESS_BIG>;
-template class handler_entry_write_nop<3, -3, ENDIANNESS_LITTLE>;
-template class handler_entry_write_nop<3, -3, ENDIANNESS_BIG>;
+template class handler_entry_read_unmapped<0, 1>;
+template class handler_entry_read_unmapped<0, 0>;
+template class handler_entry_read_unmapped<1, 3>;
+template class handler_entry_read_unmapped<1, 0>;
+template class handler_entry_read_unmapped<1, -1>;
+template class handler_entry_read_unmapped<2, 3>;
+template class handler_entry_read_unmapped<2, 0>;
+template class handler_entry_read_unmapped<2, -1>;
+template class handler_entry_read_unmapped<2, -2>;
+template class handler_entry_read_unmapped<3, 0>;
+template class handler_entry_read_unmapped<3, -1>;
+template class handler_entry_read_unmapped<3, -2>;
+template class handler_entry_read_unmapped<3, -3>;
+
+template class handler_entry_write_unmapped<0, 1>;
+template class handler_entry_write_unmapped<0, 0>;
+template class handler_entry_write_unmapped<1, 3>;
+template class handler_entry_write_unmapped<1, 0>;
+template class handler_entry_write_unmapped<1, -1>;
+template class handler_entry_write_unmapped<2, 3>;
+template class handler_entry_write_unmapped<2, 0>;
+template class handler_entry_write_unmapped<2, -1>;
+template class handler_entry_write_unmapped<2, -2>;
+template class handler_entry_write_unmapped<3, 0>;
+template class handler_entry_write_unmapped<3, -1>;
+template class handler_entry_write_unmapped<3, -2>;
+template class handler_entry_write_unmapped<3, -3>;
+
+
+template class handler_entry_read_nop<0, 1>;
+template class handler_entry_read_nop<0, 0>;
+template class handler_entry_read_nop<1, 3>;
+template class handler_entry_read_nop<1, 0>;
+template class handler_entry_read_nop<1, -1>;
+template class handler_entry_read_nop<2, 3>;
+template class handler_entry_read_nop<2, 0>;
+template class handler_entry_read_nop<2, -1>;
+template class handler_entry_read_nop<2, -2>;
+template class handler_entry_read_nop<3, 0>;
+template class handler_entry_read_nop<3, -1>;
+template class handler_entry_read_nop<3, -2>;
+template class handler_entry_read_nop<3, -3>;
+
+template class handler_entry_write_nop<0, 1>;
+template class handler_entry_write_nop<0, 0>;
+template class handler_entry_write_nop<1, 3>;
+template class handler_entry_write_nop<1, 0>;
+template class handler_entry_write_nop<1, -1>;
+template class handler_entry_write_nop<2, 3>;
+template class handler_entry_write_nop<2, 0>;
+template class handler_entry_write_nop<2, -1>;
+template class handler_entry_write_nop<2, -2>;
+template class handler_entry_write_nop<3, 0>;
+template class handler_entry_write_nop<3, -1>;
+template class handler_entry_write_nop<3, -2>;
+template class handler_entry_write_nop<3, -3>;
diff --git a/src/emu/emumem_heun.h b/src/emu/emumem_heun.h
index 1e1d0fb4ab3..4d102267f5f 100644
--- a/src/emu/emumem_heun.h
+++ b/src/emu/emumem_heun.h
@@ -9,12 +9,12 @@
// Logs an unmapped access
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_unmapped : public handler_entry_read<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_unmapped : public handler_entry_read<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- handler_entry_read_unmapped(address_space *space) : handler_entry_read<Width, AddrShift, Endian>(space, 0) {}
+ handler_entry_read_unmapped(address_space *space) : handler_entry_read<Width, AddrShift>(space, 0) {}
~handler_entry_read_unmapped() = default;
uX read(offs_t offset, uX mem_mask) const override;
@@ -22,12 +22,12 @@ public:
std::string name() const override;
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_unmapped : public handler_entry_write<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_unmapped : public handler_entry_write<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- handler_entry_write_unmapped(address_space *space) : handler_entry_write<Width, AddrShift, Endian>(space, 0) {}
+ handler_entry_write_unmapped(address_space *space) : handler_entry_write<Width, AddrShift>(space, 0) {}
~handler_entry_write_unmapped() = default;
void write(offs_t offset, uX data, uX mem_mask) const override;
@@ -41,12 +41,12 @@ public:
// Drops an unmapped access silently
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_read_nop : public handler_entry_read<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_read_nop : public handler_entry_read<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- handler_entry_read_nop(address_space *space) : handler_entry_read<Width, AddrShift, Endian>(space, 0) {}
+ handler_entry_read_nop(address_space *space) : handler_entry_read<Width, AddrShift>(space, 0) {}
~handler_entry_read_nop() = default;
uX read(offs_t offset, uX mem_mask) const override;
@@ -54,12 +54,12 @@ public:
std::string name() const override;
};
-template<int Width, int AddrShift, endianness_t Endian> class handler_entry_write_nop : public handler_entry_write<Width, AddrShift, Endian>
+template<int Width, int AddrShift> class handler_entry_write_nop : public handler_entry_write<Width, AddrShift>
{
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
- handler_entry_write_nop(address_space *space) : handler_entry_write<Width, AddrShift, Endian>(space, 0) {}
+ handler_entry_write_nop(address_space *space) : handler_entry_write<Width, AddrShift>(space, 0) {}
~handler_entry_write_nop() = default;
void write(offs_t offset, uX data, uX mem_mask) const override;
diff --git a/src/emu/emumem_mud.cpp b/src/emu/emumem_mud.cpp
index 0a287cc6c1d..094e6663a04 100644
--- a/src/emu/emumem_mud.cpp
+++ b/src/emu/emumem_mud.cpp
@@ -35,7 +35,7 @@ template<> u8 mask_to_ukey<u64>(u64 mask)
(mask & 0x00000000000000ff ? 0x01 : 0x00);
}
-template<int Width, int AddrShift, endianness_t Endian> memory_units_descriptor<Width, AddrShift, Endian>::memory_units_descriptor(u8 access_width, u8 access_endian, handler_entry *handler, offs_t addrstart, offs_t addrend, offs_t mask, typename emu::detail::handler_entry_size<Width>::uX unitmask, int cswidth) : m_handler(handler), m_access_width(access_width), m_access_endian(access_endian)
+template<int Width, int AddrShift> memory_units_descriptor<Width, AddrShift>::memory_units_descriptor(u8 access_width, u8 access_endian, handler_entry *handler, offs_t addrstart, offs_t addrend, offs_t mask, typename emu::detail::handler_entry_size<Width>::uX unitmask, int cswidth) : m_handler(handler), m_access_width(access_width), m_access_endian(access_endian)
{
u32 bits_per_access = 8 << access_width;
constexpr u32 NATIVE_MASK = Width + AddrShift >= 0 ? make_bitmask<u32>(Width + AddrShift) : 0;
@@ -49,7 +49,7 @@ template<int Width, int AddrShift, endianness_t Endian> memory_units_descriptor<
umasks.fill(unitmask);
uX smask, emask;
- if(Endian == ENDIANNESS_BIG) {
+ if(access_endian == ENDIANNESS_BIG) {
smask = make_bitmask<uX>(8*sizeof(uX) - ((addrstart - m_addrstart) << (3 - AddrShift)));
emask = ~make_bitmask<uX>(8*sizeof(uX) - ((addrend - m_addrend + 1) << (3 - AddrShift)));
} else {
@@ -86,7 +86,7 @@ template<int Width, int AddrShift, endianness_t Endian> memory_units_descriptor<
generate(m_keymap[i], unitmask, umasks[i], cswidth, bits_per_access, base_shift, shift, active_count);
}
-template<int Width, int AddrShift, endianness_t Endian> void memory_units_descriptor<Width, AddrShift, Endian>::generate(u8 ukey, typename emu::detail::handler_entry_size<Width>::uX gumask, typename emu::detail::handler_entry_size<Width>::uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count)
+template<int Width, int AddrShift> void memory_units_descriptor<Width, AddrShift>::generate(u8 ukey, typename emu::detail::handler_entry_size<Width>::uX gumask, typename emu::detail::handler_entry_size<Width>::uX umask, u32 cswidth, u32 bits_per_access, u8 base_shift, s8 shift, u32 active_count)
{
auto &entries = m_entries_for_key[ukey];
@@ -103,32 +103,21 @@ template<int Width, int AddrShift, endianness_t Endian> void memory_units_descri
uX numask = dmask << i;
if(umask & numask) {
uX amask = csmask << (i & ~(cswidth - 1));
- entries.emplace_back(entry{ amask, numask, shift, u8(i), u8(Endian == ENDIANNESS_BIG ? active_count - 1 - offset : offset) });
+ entries.emplace_back(entry{ amask, numask, shift, u8(i), u8(m_access_endian == ENDIANNESS_BIG ? active_count - 1 - offset : offset) });
}
if(gumask & numask)
offset ++;
}
}
-template class memory_units_descriptor<1, 3, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<1, 3, ENDIANNESS_BIG>;
-template class memory_units_descriptor<1, 0, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<1, 0, ENDIANNESS_BIG>;
-template class memory_units_descriptor<1, -1, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<1, -1, ENDIANNESS_BIG>;
-template class memory_units_descriptor<2, 3, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<2, 3, ENDIANNESS_BIG>;
-template class memory_units_descriptor<2, 0, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<2, 0, ENDIANNESS_BIG>;
-template class memory_units_descriptor<2, -1, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<2, -1, ENDIANNESS_BIG>;
-template class memory_units_descriptor<2, -2, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<2, -2, ENDIANNESS_BIG>;
-template class memory_units_descriptor<3, 0, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<3, 0, ENDIANNESS_BIG>;
-template class memory_units_descriptor<3, -1, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<3, -1, ENDIANNESS_BIG>;
-template class memory_units_descriptor<3, -2, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<3, -2, ENDIANNESS_BIG>;
-template class memory_units_descriptor<3, -3, ENDIANNESS_LITTLE>;
-template class memory_units_descriptor<3, -3, ENDIANNESS_BIG>;
+template class memory_units_descriptor<1, 3>;
+template class memory_units_descriptor<1, 0>;
+template class memory_units_descriptor<1, -1>;
+template class memory_units_descriptor<2, 3>;
+template class memory_units_descriptor<2, 0>;
+template class memory_units_descriptor<2, -1>;
+template class memory_units_descriptor<2, -2>;
+template class memory_units_descriptor<3, 0>;
+template class memory_units_descriptor<3, -1>;
+template class memory_units_descriptor<3, -2>;
+template class memory_units_descriptor<3, -3>;
diff --git a/src/emu/emumem_mud.h b/src/emu/emumem_mud.h
index a25ec7051a5..5a95af1a49f 100644
--- a/src/emu/emumem_mud.h
+++ b/src/emu/emumem_mud.h
@@ -3,7 +3,7 @@
// Descriptors for subunit support
-template<int Width, int AddrShift, endianness_t Endian> class memory_units_descriptor {
+template<int Width, int AddrShift> class memory_units_descriptor {
public:
using uX = typename emu::detail::handler_entry_size<Width>::uX;
diff --git a/src/emu/emumem_mview.cpp b/src/emu/emumem_mview.cpp
index f132809615a..aef50da465f 100644
--- a/src/emu/emumem_mview.cpp
+++ b/src/emu/emumem_mview.cpp
@@ -95,7 +95,7 @@ address_map_entry &memory_view::memory_view_entry::operator()(offs_t start, offs
return (*m_map)(start, end);
}
-template<int Level, int Width, int AddrShift, endianness_t Endian>
+template<int Level, int Width, int AddrShift>
class memory_view_entry_specific : public memory_view::memory_view_entry
{
using uX = typename emu::detail::handler_entry_size<Width>::uX;
@@ -115,8 +115,8 @@ public:
virtual ~memory_view_entry_specific() = default;
- handler_entry_read <Width, AddrShift, Endian> *r() { return static_cast<handler_entry_read <Width, AddrShift, Endian> *>(m_view.m_handler_read); }
- handler_entry_write<Width, AddrShift, Endian> *w() { return static_cast<handler_entry_write<Width, AddrShift, Endian> *>(m_view.m_handler_write); }
+ handler_entry_read <Width, AddrShift> *r() { return static_cast<handler_entry_read <Width, AddrShift> *>(m_view.m_handler_read); }
+ handler_entry_write<Width, AddrShift> *w() { return static_cast<handler_entry_write<Width, AddrShift> *>(m_view.m_handler_write); }
void invalidate_caches(read_or_write readorwrite) { return m_view.m_space->invalidate_caches(readorwrite); }
@@ -345,12 +345,12 @@ public:
check_optimize_all("install_read_handler", 8 << AccessWidth, addrstart, addrend, addrmask, addrmirror, addrselect, unitmask, cswidth, nstart, nend, nmask, nmirror, nunitmask, ncswidth);
if constexpr (Width == AccessWidth) {
- auto hand_r = new handler_entry_read_delegate<Width, AddrShift, Endian, READ>(m_view.m_space, handler_r);
+ auto hand_r = new handler_entry_read_delegate<Width, AddrShift, READ>(m_view.m_space, handler_r);
hand_r->set_address_info(nstart, nmask);
r()->populate(nstart, nend, nmirror, hand_r);
} else {
- auto hand_r = new handler_entry_read_delegate<AccessWidth, -AccessWidth, Endian, READ>(m_view.m_space, handler_r);
- memory_units_descriptor<Width, AddrShift, Endian> descriptor(AccessWidth, Endian, hand_r, nstart, nend, nmask, nunitmask, ncswidth);
+ auto hand_r = new handler_entry_read_delegate<AccessWidth, -AccessWidth, READ>(m_view.m_space, handler_r);
+ memory_units_descriptor<Width, AddrShift> descriptor(AccessWidth, endianness(), hand_r, nstart, nend, nmask, nunitmask, ncswidth);
hand_r->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
r()->populate_mismatched(nstart, nend, nmirror, descriptor);
hand_r->unref();
@@ -378,12 +378,12 @@ public:
check_optimize_all("install_write_handler", 8 << AccessWidth, addrstart, addrend, addrmask, addrmirror, addrselect, unitmask, cswidth, nstart, nend, nmask, nmirror, nunitmask, ncswidth);
if constexpr (Width == AccessWidth) {
- auto hand_w = new handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>(m_view.m_space, handler_w);
+ auto hand_w = new handler_entry_write_delegate<Width, AddrShift, WRITE>(m_view.m_space, handler_w);
hand_w->set_address_info(nstart, nmask);
w()->populate(nstart, nend, nmirror, hand_w);
} else {
- auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, Endian, WRITE>(m_view.m_space, handler_w);
- memory_units_descriptor<Width, AddrShift, Endian> descriptor(AccessWidth, Endian, hand_w, nstart, nend, nmask, nunitmask, ncswidth);
+ auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, WRITE>(m_view.m_space, handler_w);
+ memory_units_descriptor<Width, AddrShift> descriptor(AccessWidth, endianness(), hand_w, nstart, nend, nmask, nunitmask, ncswidth);
hand_w->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
w()->populate_mismatched(nstart, nend, nmirror, descriptor);
hand_w->unref();
@@ -412,21 +412,21 @@ public:
check_optimize_all("install_readwrite_handler", 8 << AccessWidth, addrstart, addrend, addrmask, addrmirror, addrselect, unitmask, cswidth, nstart, nend, nmask, nmirror, nunitmask, ncswidth);
if constexpr (Width == AccessWidth) {
- auto hand_r = new handler_entry_read_delegate <Width, AddrShift, Endian, READ>(m_view.m_space, handler_r);
+ auto hand_r = new handler_entry_read_delegate <Width, AddrShift, READ>(m_view.m_space, handler_r);
hand_r->set_address_info(nstart, nmask);
r() ->populate(nstart, nend, nmirror, hand_r);
- auto hand_w = new handler_entry_write_delegate<Width, AddrShift, Endian, WRITE>(m_view.m_space, handler_w);
+ auto hand_w = new handler_entry_write_delegate<Width, AddrShift, WRITE>(m_view.m_space, handler_w);
hand_w->set_address_info(nstart, nmask);
w()->populate(nstart, nend, nmirror, hand_w);
} else {
- auto hand_r = new handler_entry_read_delegate <AccessWidth, -AccessWidth, Endian, READ>(m_view.m_space, handler_r);
- memory_units_descriptor<Width, AddrShift, Endian> descriptor(AccessWidth, Endian, hand_r, nstart, nend, nmask, nunitmask, ncswidth);
+ auto hand_r = new handler_entry_read_delegate <AccessWidth, -AccessWidth, READ>(m_view.m_space, handler_r);
+ memory_units_descriptor<Width, AddrShift> descriptor(AccessWidth, endianness(), hand_r, nstart, nend, nmask, nunitmask, ncswidth);
hand_r->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
r() ->populate_mismatched(nstart, nend, nmirror, descriptor);
hand_r->unref();
- auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, Endian, WRITE>(m_view.m_space, handler_w);
+ auto hand_w = new handler_entry_write_delegate<AccessWidth, -AccessWidth, WRITE>(m_view.m_space, handler_w);
descriptor.set_subunit_handler(hand_w);
hand_w->set_address_info(descriptor.get_handler_start(), descriptor.get_handler_mask());
w()->populate_mismatched(nstart, nend, nmirror, descriptor);
@@ -438,41 +438,33 @@ public:
};
namespace {
- template<int Level, int Width, int AddrShift, endianness_t Endian> memory_view::memory_view_entry *mve_make_1(const address_space_config &config, memory_manager &manager, memory_view &view, int id) {
- return new memory_view_entry_specific<Level, Width, AddrShift, Endian>(config, manager, view, id);
+ template<int Level, int Width, int AddrShift> memory_view::memory_view_entry *mve_make_1(const address_space_config &config, memory_manager &manager, memory_view &view, int id) {
+ return new memory_view_entry_specific<Level, Width, AddrShift>(config, manager, view, id);
}
- template<int Width, int AddrShift, endianness_t Endian> memory_view::memory_view_entry *mve_make_2(int Level, const address_space_config &config, memory_manager &manager, memory_view &view, int id) {
+ template<int Width, int AddrShift> memory_view::memory_view_entry *mve_make_2(int Level, const address_space_config &config, memory_manager &manager, memory_view &view, int id) {
switch(Level) {
- case 0: return mve_make_1<0, Width, AddrShift, Endian>(config, manager, view, id);
- case 1: return mve_make_1<1, Width, AddrShift, Endian>(config, manager, view, id);
+ case 0: return mve_make_1<0, Width, AddrShift>(config, manager, view, id);
+ case 1: return mve_make_1<1, Width, AddrShift>(config, manager, view, id);
default: abort();
}
}
- template<int Width, int AddrShift> memory_view::memory_view_entry *mve_make_3(int Level, endianness_t Endian, const address_space_config &config, memory_manager &manager, memory_view &view, int id) {
- switch(Endian) {
- case ENDIANNESS_LITTLE: return mve_make_2<Width, AddrShift, ENDIANNESS_LITTLE>(Level, config, manager, view, id);
- case ENDIANNESS_BIG: return mve_make_2<Width, AddrShift, ENDIANNESS_BIG> (Level, config, manager, view, id);
- default: abort();
- }
- }
-
- memory_view::memory_view_entry *mve_make(int Level, int Width, int AddrShift, endianness_t Endian, const address_space_config &config, memory_manager &manager, memory_view &view, int id) {
+ memory_view::memory_view_entry *mve_make(int Level, int Width, int AddrShift, const address_space_config &config, memory_manager &manager, memory_view &view, int id) {
switch (Width | (AddrShift + 4)) {
- case 8|(4+1): return mve_make_3<0, 1>(Level, Endian, config, manager, view, id);
- case 8|(4-0): return mve_make_3<0, 0>(Level, Endian, config, manager, view, id);
- case 16|(4+3): return mve_make_3<1, 3>(Level, Endian, config, manager, view, id);
- case 16|(4-0): return mve_make_3<1, 0>(Level, Endian, config, manager, view, id);
- case 16|(4-1): return mve_make_3<1, -1>(Level, Endian, config, manager, view, id);
- case 32|(4+3): return mve_make_3<2, 3>(Level, Endian, config, manager, view, id);
- case 32|(4-0): return mve_make_3<2, 0>(Level, Endian, config, manager, view, id);
- case 32|(4-1): return mve_make_3<2, -1>(Level, Endian, config, manager, view, id);
- case 32|(4-2): return mve_make_3<2, -2>(Level, Endian, config, manager, view, id);
- case 64|(4-0): return mve_make_3<3, 0>(Level, Endian, config, manager, view, id);
- case 64|(4-1): return mve_make_3<3, -1>(Level, Endian, config, manager, view, id);
- case 64|(4-2): return mve_make_3<3, -2>(Level, Endian, config, manager, view, id);
- case 64|(4-3): return mve_make_3<3, -3>(Level, Endian, config, manager, view, id);
+ case 8|(4+1): return mve_make_2<0, 1>(Level, config, manager, view, id);
+ case 8|(4-0): return mve_make_2<0, 0>(Level, config, manager, view, id);
+ case 16|(4+3): return mve_make_2<1, 3>(Level, config, manager, view, id);
+ case 16|(4-0): return mve_make_2<1, 0>(Level, config, manager, view, id);
+ case 16|(4-1): return mve_make_2<1, -1>(Level, config, manager, view, id);
+ case 32|(4+3): return mve_make_2<2, 3>(Level, config, manager, view, id);
+ case 32|(4-0): return mve_make_2<2, 0>(Level, config, manager, view, id);
+ case 32|(4-1): return mve_make_2<2, -1>(Level, config, manager, view, id);
+ case 32|(4-2): return mve_make_2<2, -2>(Level, config, manager, view, id);
+ case 64|(4-0): return mve_make_2<3, 0>(Level, config, manager, view, id);
+ case 64|(4-1): return mve_make_2<3, -1>(Level, config, manager, view, id);
+ case 64|(4-2): return mve_make_2<3, -2>(Level, config, manager, view, id);
+ case 64|(4-3): return mve_make_2<3, -3>(Level, config, manager, view, id);
default: abort();
}
}
@@ -487,7 +479,7 @@ memory_view::memory_view_entry &memory_view::operator[](int slot)
if (i == m_entry_mapping.end()) {
memory_view_entry *e;
int id = m_entries.size();
- e = mve_make(emu::detail::handler_entry_dispatch_level(m_config->addr_width()), m_config->data_width(), m_config->addr_shift(), m_config->endianness(),
+ e = mve_make(emu::detail::handler_entry_dispatch_level(m_config->addr_width()), m_config->data_width(), m_config->addr_shift(),
*m_config, m_device.machine().memory(), *this, id);
m_entries.resize(id+1);
m_entries[id].reset(e);
@@ -607,7 +599,7 @@ void memory_view::memory_view_entry::prepare_device_map(address_map &map)
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_view_entry_specific<Level, Width, AddrShift, Endian>::populate_from_map(address_map *map)
+template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::populate_from_map(address_map *map)
{
// no map specified, use the space-specific one and import the submaps
if (map == nullptr) {
@@ -703,68 +695,60 @@ void memory_view::initialize_from_address_map(offs_t addrstart, offs_t addrend,
}
namespace {
- template<int Width, int AddrShift, endianness_t Endian> void h_make_1(int HighBits, address_space &space, memory_view &view, handler_entry *&r, handler_entry *&w) {
+ template<int Width, int AddrShift> void h_make_1(int HighBits, address_space &space, memory_view &view, handler_entry *&r, handler_entry *&w) {
switch(HighBits) {
- case 0: r = new handler_entry_read_dispatch<std::max(0, Width), Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<std::max(0, Width), Width, AddrShift, Endian>(&space, view); break;
- case 1: r = new handler_entry_read_dispatch<std::max(1, Width), Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<std::max(1, Width), Width, AddrShift, Endian>(&space, view); break;
- case 2: r = new handler_entry_read_dispatch<std::max(2, Width), Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<std::max(2, Width), Width, AddrShift, Endian>(&space, view); break;
- case 3: r = new handler_entry_read_dispatch<std::max(3, Width), Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<std::max(3, Width), Width, AddrShift, Endian>(&space, view); break;
- case 4: r = new handler_entry_read_dispatch< 4, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch< 4, Width, AddrShift, Endian>(&space, view); break;
- case 5: r = new handler_entry_read_dispatch< 5, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch< 5, Width, AddrShift, Endian>(&space, view); break;
- case 6: r = new handler_entry_read_dispatch< 6, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch< 6, Width, AddrShift, Endian>(&space, view); break;
- case 7: r = new handler_entry_read_dispatch< 7, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch< 7, Width, AddrShift, Endian>(&space, view); break;
- case 8: r = new handler_entry_read_dispatch< 8, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch< 8, Width, AddrShift, Endian>(&space, view); break;
- case 9: r = new handler_entry_read_dispatch< 9, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch< 9, Width, AddrShift, Endian>(&space, view); break;
- case 10: r = new handler_entry_read_dispatch<10, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<10, Width, AddrShift, Endian>(&space, view); break;
- case 11: r = new handler_entry_read_dispatch<11, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<11, Width, AddrShift, Endian>(&space, view); break;
- case 12: r = new handler_entry_read_dispatch<12, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<12, Width, AddrShift, Endian>(&space, view); break;
- case 13: r = new handler_entry_read_dispatch<13, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<13, Width, AddrShift, Endian>(&space, view); break;
- case 14: r = new handler_entry_read_dispatch<14, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<14, Width, AddrShift, Endian>(&space, view); break;
- case 15: r = new handler_entry_read_dispatch<15, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<15, Width, AddrShift, Endian>(&space, view); break;
- case 16: r = new handler_entry_read_dispatch<16, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<16, Width, AddrShift, Endian>(&space, view); break;
- case 17: r = new handler_entry_read_dispatch<17, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<17, Width, AddrShift, Endian>(&space, view); break;
- case 18: r = new handler_entry_read_dispatch<18, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<18, Width, AddrShift, Endian>(&space, view); break;
- case 19: r = new handler_entry_read_dispatch<19, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<19, Width, AddrShift, Endian>(&space, view); break;
- case 20: r = new handler_entry_read_dispatch<20, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<20, Width, AddrShift, Endian>(&space, view); break;
- case 21: r = new handler_entry_read_dispatch<21, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<21, Width, AddrShift, Endian>(&space, view); break;
- case 22: r = new handler_entry_read_dispatch<22, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<22, Width, AddrShift, Endian>(&space, view); break;
- case 23: r = new handler_entry_read_dispatch<23, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<23, Width, AddrShift, Endian>(&space, view); break;
- case 24: r = new handler_entry_read_dispatch<24, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<24, Width, AddrShift, Endian>(&space, view); break;
- case 25: r = new handler_entry_read_dispatch<25, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<25, Width, AddrShift, Endian>(&space, view); break;
- case 26: r = new handler_entry_read_dispatch<26, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<26, Width, AddrShift, Endian>(&space, view); break;
- case 27: r = new handler_entry_read_dispatch<27, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<27, Width, AddrShift, Endian>(&space, view); break;
- case 28: r = new handler_entry_read_dispatch<28, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<28, Width, AddrShift, Endian>(&space, view); break;
- case 29: r = new handler_entry_read_dispatch<29, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<29, Width, AddrShift, Endian>(&space, view); break;
- case 30: r = new handler_entry_read_dispatch<30, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<30, Width, AddrShift, Endian>(&space, view); break;
- case 31: r = new handler_entry_read_dispatch<31, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<31, Width, AddrShift, Endian>(&space, view); break;
- case 32: r = new handler_entry_read_dispatch<32, Width, AddrShift, Endian>(&space, view); w = new handler_entry_write_dispatch<32, Width, AddrShift, Endian>(&space, view); break;
- default: abort();
- }
- }
-
- template<int Width, int AddrShift> void h_make_2(int HighBits, endianness_t Endian, address_space &space, memory_view &view, handler_entry *&r, handler_entry *&w) {
- switch(Endian) {
- case ENDIANNESS_LITTLE: h_make_1<Width, AddrShift, ENDIANNESS_LITTLE>(HighBits, space, view, r, w); break;
- case ENDIANNESS_BIG: h_make_1<Width, AddrShift, ENDIANNESS_BIG> (HighBits, space, view, r, w); break;
+ case 0: r = new handler_entry_read_dispatch<std::max(0, Width), Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<std::max(0, Width), Width, AddrShift>(&space, view); break;
+ case 1: r = new handler_entry_read_dispatch<std::max(1, Width), Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<std::max(1, Width), Width, AddrShift>(&space, view); break;
+ case 2: r = new handler_entry_read_dispatch<std::max(2, Width), Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<std::max(2, Width), Width, AddrShift>(&space, view); break;
+ case 3: r = new handler_entry_read_dispatch<std::max(3, Width), Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<std::max(3, Width), Width, AddrShift>(&space, view); break;
+ case 4: r = new handler_entry_read_dispatch< 4, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch< 4, Width, AddrShift>(&space, view); break;
+ case 5: r = new handler_entry_read_dispatch< 5, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch< 5, Width, AddrShift>(&space, view); break;
+ case 6: r = new handler_entry_read_dispatch< 6, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch< 6, Width, AddrShift>(&space, view); break;
+ case 7: r = new handler_entry_read_dispatch< 7, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch< 7, Width, AddrShift>(&space, view); break;
+ case 8: r = new handler_entry_read_dispatch< 8, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch< 8, Width, AddrShift>(&space, view); break;
+ case 9: r = new handler_entry_read_dispatch< 9, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch< 9, Width, AddrShift>(&space, view); break;
+ case 10: r = new handler_entry_read_dispatch<10, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<10, Width, AddrShift>(&space, view); break;
+ case 11: r = new handler_entry_read_dispatch<11, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<11, Width, AddrShift>(&space, view); break;
+ case 12: r = new handler_entry_read_dispatch<12, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<12, Width, AddrShift>(&space, view); break;
+ case 13: r = new handler_entry_read_dispatch<13, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<13, Width, AddrShift>(&space, view); break;
+ case 14: r = new handler_entry_read_dispatch<14, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<14, Width, AddrShift>(&space, view); break;
+ case 15: r = new handler_entry_read_dispatch<15, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<15, Width, AddrShift>(&space, view); break;
+ case 16: r = new handler_entry_read_dispatch<16, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<16, Width, AddrShift>(&space, view); break;
+ case 17: r = new handler_entry_read_dispatch<17, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<17, Width, AddrShift>(&space, view); break;
+ case 18: r = new handler_entry_read_dispatch<18, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<18, Width, AddrShift>(&space, view); break;
+ case 19: r = new handler_entry_read_dispatch<19, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<19, Width, AddrShift>(&space, view); break;
+ case 20: r = new handler_entry_read_dispatch<20, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<20, Width, AddrShift>(&space, view); break;
+ case 21: r = new handler_entry_read_dispatch<21, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<21, Width, AddrShift>(&space, view); break;
+ case 22: r = new handler_entry_read_dispatch<22, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<22, Width, AddrShift>(&space, view); break;
+ case 23: r = new handler_entry_read_dispatch<23, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<23, Width, AddrShift>(&space, view); break;
+ case 24: r = new handler_entry_read_dispatch<24, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<24, Width, AddrShift>(&space, view); break;
+ case 25: r = new handler_entry_read_dispatch<25, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<25, Width, AddrShift>(&space, view); break;
+ case 26: r = new handler_entry_read_dispatch<26, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<26, Width, AddrShift>(&space, view); break;
+ case 27: r = new handler_entry_read_dispatch<27, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<27, Width, AddrShift>(&space, view); break;
+ case 28: r = new handler_entry_read_dispatch<28, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<28, Width, AddrShift>(&space, view); break;
+ case 29: r = new handler_entry_read_dispatch<29, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<29, Width, AddrShift>(&space, view); break;
+ case 30: r = new handler_entry_read_dispatch<30, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<30, Width, AddrShift>(&space, view); break;
+ case 31: r = new handler_entry_read_dispatch<31, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<31, Width, AddrShift>(&space, view); break;
+ case 32: r = new handler_entry_read_dispatch<32, Width, AddrShift>(&space, view); w = new handler_entry_write_dispatch<32, Width, AddrShift>(&space, view); break;
default: abort();
}
}
- void h_make(int HighBits, int Width, int AddrShift, endianness_t Endian, address_space &space, memory_view &view, handler_entry *&r, handler_entry *&w) {
+ void h_make(int HighBits, int Width, int AddrShift, address_space &space, memory_view &view, handler_entry *&r, handler_entry *&w) {
switch (Width | (AddrShift + 4)) {
- case 8|(4+1): h_make_2<0, 1>(HighBits, Endian, space, view, r, w); break;
- case 8|(4-0): h_make_2<0, 0>(HighBits, Endian, space, view, r, w); break;
- case 16|(4+3): h_make_2<1, 3>(HighBits, Endian, space, view, r, w); break;
- case 16|(4-0): h_make_2<1, 0>(HighBits, Endian, space, view, r, w); break;
- case 16|(4-1): h_make_2<1, -1>(HighBits, Endian, space, view, r, w); break;
- case 32|(4+3): h_make_2<2, 3>(HighBits, Endian, space, view, r, w); break;
- case 32|(4-0): h_make_2<2, 0>(HighBits, Endian, space, view, r, w); break;
- case 32|(4-1): h_make_2<2, -1>(HighBits, Endian, space, view, r, w); break;
- case 32|(4-2): h_make_2<2, -2>(HighBits, Endian, space, view, r, w); break;
- case 64|(4-0): h_make_2<3, 0>(HighBits, Endian, space, view, r, w); break;
- case 64|(4-1): h_make_2<3, -1>(HighBits, Endian, space, view, r, w); break;
- case 64|(4-2): h_make_2<3, -2>(HighBits, Endian, space, view, r, w); break;
- case 64|(4-3): h_make_2<3, -3>(HighBits, Endian, space, view, r, w); break;
+ case 8|(4+1): h_make_1<0, 1>(HighBits, space, view, r, w); break;
+ case 8|(4-0): h_make_1<0, 0>(HighBits, space, view, r, w); break;
+ case 16|(4+3): h_make_1<1, 3>(HighBits, space, view, r, w); break;
+ case 16|(4-0): h_make_1<1, 0>(HighBits, space, view, r, w); break;
+ case 16|(4-1): h_make_1<1, -1>(HighBits, space, view, r, w); break;
+ case 32|(4+3): h_make_1<2, 3>(HighBits, space, view, r, w); break;
+ case 32|(4-0): h_make_1<2, 0>(HighBits, space, view, r, w); break;
+ case 32|(4-1): h_make_1<2, -1>(HighBits, space, view, r, w); break;
+ case 32|(4-2): h_make_1<2, -2>(HighBits, space, view, r, w); break;
+ case 64|(4-0): h_make_1<3, 0>(HighBits, space, view, r, w); break;
+ case 64|(4-1): h_make_1<3, -1>(HighBits, space, view, r, w); break;
+ case 64|(4-2): h_make_1<3, -2>(HighBits, space, view, r, w); break;
+ case 64|(4-3): h_make_1<3, -3>(HighBits, space, view, r, w); break;
default: abort();
}
}
@@ -790,7 +774,7 @@ std::pair<handler_entry *, handler_entry *> memory_view::make_handlers(address_s
offs_t span = addrstart ^ addrend;
u32 awidth = 32 - count_leading_zeros_32(span);
- h_make(awidth, m_config->data_width(), m_config->addr_shift(), m_config->endianness(), space, *this, m_handler_read, m_handler_write);
+ h_make(awidth, m_config->data_width(), m_config->addr_shift(), space, *this, m_handler_read, m_handler_write);
m_handler_read->ref();
m_handler_write->ref();
}
@@ -826,7 +810,7 @@ void memory_view::memory_view_entry::check_range_address(const char *function, o
fatalerror("%s: The range %x-%x exceeds the view window boundaries %x-%x.\n", function, addrstart, addrend, m_view.m_addrstart, m_view.m_addrend);
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_ram_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, void *baseptr)
+template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::install_ram_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, void *baseptr)
{
VPRINTF("memory_view::install_ram_generic(%s-%s mirror=%s, %s, %p)\n",
m_addrchars, addrstart, m_addrchars, addrend,
@@ -843,7 +827,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
// map for read
if (readorwrite == read_or_write::READ || readorwrite == read_or_write::READWRITE)
{
- auto hand_r = new handler_entry_read_memory<Width, AddrShift, Endian>(m_view.m_space, baseptr);
+ auto hand_r = new handler_entry_read_memory<Width, AddrShift>(m_view.m_space, baseptr);
hand_r->set_address_info(nstart, nmask);
r()->populate(nstart, nend, nmirror, hand_r);
}
@@ -851,7 +835,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
// map for write
if (readorwrite == read_or_write::WRITE || readorwrite == read_or_write::READWRITE)
{
- auto hand_w = new handler_entry_write_memory<Width, AddrShift, Endian>(m_view.m_space, baseptr);
+ auto hand_w = new handler_entry_write_memory<Width, AddrShift>(m_view.m_space, baseptr);
hand_w->set_address_info(nstart, nmask);
w()->populate(nstart, nend, nmirror, hand_w);
}
@@ -859,7 +843,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
invalidate_caches(readorwrite);
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_view_entry_specific<Level, Width, AddrShift, Endian>::unmap_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, bool quiet)
+template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::unmap_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, read_or_write readorwrite, bool quiet)
{
VPRINTF("memory_view::unmap(%*x-%*x mirror=%*x, %s, %s)\n",
m_addrchars, addrstart, m_addrchars, addrend,
@@ -875,14 +859,14 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
// read space
if (readorwrite == read_or_write::READ || readorwrite == read_or_write::READWRITE) {
- auto handler = static_cast<handler_entry_read<Width, AddrShift, Endian> *>(quiet ? m_view.m_space->nop_r() : m_view.m_space->unmap_r());
+ auto handler = static_cast<handler_entry_read<Width, AddrShift> *>(quiet ? m_view.m_space->nop_r() : m_view.m_space->unmap_r());
handler->ref();
r()->populate(nstart, nend, nmirror, handler);
}
// write space
if (readorwrite == read_or_write::WRITE || readorwrite == read_or_write::READWRITE) {
- auto handler = static_cast<handler_entry_write<Width, AddrShift, Endian> *>(quiet ? m_view.m_space->nop_w() : m_view.m_space->unmap_w());
+ auto handler = static_cast<handler_entry_write<Width, AddrShift> *>(quiet ? m_view.m_space->nop_w() : m_view.m_space->unmap_w());
handler->ref();
w()->populate(nstart, nend, nmirror, handler);
}
@@ -890,7 +874,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
invalidate_caches(readorwrite);
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_view(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_view &view)
+template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::install_view(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_view &view)
{
offs_t nstart, nend, nmask, nmirror;
check_range_optimize_mirror("install_view", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror);
@@ -899,12 +883,12 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
w()->select_u(m_id);
auto handlers = view.make_handlers(*m_view.m_space, addrstart, addrend);
- r()->populate(nstart, nend, nmirror, static_cast<handler_entry_read <Width, AddrShift, Endian> *>(handlers.first));
- w()->populate(nstart, nend, nmirror, static_cast<handler_entry_write<Width, AddrShift, Endian> *>(handlers.second));
+ r()->populate(nstart, nend, nmirror, static_cast<handler_entry_read <Width, AddrShift> *>(handlers.first));
+ w()->populate(nstart, nend, nmirror, static_cast<handler_entry_write<Width, AddrShift> *>(handlers.second));
view.make_subdispatch(key()); // Must be called after populate
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passthrough_handler *memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_read_tap(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap, memory_passthrough_handler *mph)
+template<int Level, int Width, int AddrShift> memory_passthrough_handler *memory_view_entry_specific<Level, Width, AddrShift>::install_read_tap(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap, memory_passthrough_handler *mph)
{
offs_t nstart, nend, nmask, nmirror;
check_range_optimize_mirror("install_read_tap", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror);
@@ -914,7 +898,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
r()->select_u(m_id);
w()->select_u(m_id);
- auto handler = new handler_entry_read_tap<Width, AddrShift, Endian>(m_view.m_space, *mph, name, tap);
+ auto handler = new handler_entry_read_tap<Width, AddrShift>(m_view.m_space, *mph, name, tap);
r()->populate_passthrough(nstart, nend, nmirror, handler);
handler->unref();
@@ -923,7 +907,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
return mph;
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passthrough_handler *memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_write_tap(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap, memory_passthrough_handler *mph)
+template<int Level, int Width, int AddrShift> memory_passthrough_handler *memory_view_entry_specific<Level, Width, AddrShift>::install_write_tap(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tap, memory_passthrough_handler *mph)
{
offs_t nstart, nend, nmask, nmirror;
check_range_optimize_mirror("install_write_tap", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror);
@@ -933,7 +917,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
r()->select_u(m_id);
w()->select_u(m_id);
- auto handler = new handler_entry_write_tap<Width, AddrShift, Endian>(m_view.m_space, *mph, name, tap);
+ auto handler = new handler_entry_write_tap<Width, AddrShift>(m_view.m_space, *mph, name, tap);
w()->populate_passthrough(nstart, nend, nmirror, handler);
handler->unref();
@@ -942,7 +926,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
return mph;
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passthrough_handler *memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_readwrite_tap(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tapr, std::function<void (offs_t offset, uX &data, uX mem_mask)> tapw, memory_passthrough_handler *mph)
+template<int Level, int Width, int AddrShift> memory_passthrough_handler *memory_view_entry_specific<Level, Width, AddrShift>::install_readwrite_tap(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string name, std::function<void (offs_t offset, uX &data, uX mem_mask)> tapr, std::function<void (offs_t offset, uX &data, uX mem_mask)> tapw, memory_passthrough_handler *mph)
{
offs_t nstart, nend, nmask, nmirror;
check_range_optimize_mirror("install_readwrite_tap", addrstart, addrend, addrmirror, nstart, nend, nmask, nmirror);
@@ -952,11 +936,11 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
r()->select_u(m_id);
w()->select_u(m_id);
- auto rhandler = new handler_entry_read_tap <Width, AddrShift, Endian>(m_view.m_space, *mph, name, tapr);
+ auto rhandler = new handler_entry_read_tap <Width, AddrShift>(m_view.m_space, *mph, name, tapr);
r() ->populate_passthrough(nstart, nend, nmirror, rhandler);
rhandler->unref();
- auto whandler = new handler_entry_write_tap<Width, AddrShift, Endian>(m_view.m_space, *mph, name, tapw);
+ auto whandler = new handler_entry_write_tap<Width, AddrShift>(m_view.m_space, *mph, name, tapw);
w()->populate_passthrough(nstart, nend, nmirror, whandler);
whandler->unref();
@@ -965,7 +949,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> memory_passth
return mph;
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_device_delegate(offs_t addrstart, offs_t addrend, device_t &device, address_map_constructor &delegate, u64 unitmask, int cswidth)
+template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::install_device_delegate(offs_t addrstart, offs_t addrend, device_t &device, address_map_constructor &delegate, u64 unitmask, int cswidth)
{
check_range_address("install_device_delegate", addrstart, addrend);
address_map map(*m_view.m_space, addrstart, addrend, unitmask, cswidth, m_view.m_device, delegate);
@@ -974,7 +958,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
populate_from_map(&map);
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_readwrite_port(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string rtag, std::string wtag)
+template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::install_readwrite_port(offs_t addrstart, offs_t addrend, offs_t addrmirror, std::string rtag, std::string wtag)
{
VPRINTF("memory_view::install_readwrite_port(%*x-%*x mirror=%*x, read=\"%s\" / write=\"%s\")\n",
m_addrchars, addrstart, m_addrchars, addrend,
@@ -996,7 +980,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
throw emu_fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, m_view.m_name, m_view.m_device.tag());
// map the range and set the ioport
- auto hand_r = new handler_entry_read_ioport<Width, AddrShift, Endian>(m_view.m_space, port);
+ auto hand_r = new handler_entry_read_ioport<Width, AddrShift>(m_view.m_space, port);
r()->populate(nstart, nend, nmirror, hand_r);
}
@@ -1008,13 +992,13 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, m_view.m_name, m_view.m_device.tag());
// map the range and set the ioport
- auto hand_w = new handler_entry_write_ioport<Width, AddrShift, Endian>(m_view.m_space, port);
+ auto hand_w = new handler_entry_write_ioport<Width, AddrShift>(m_view.m_space, port);
w()->populate(nstart, nend, nmirror, hand_w);
}
invalidate_caches(rtag != "" ? wtag != "" ? read_or_write::READWRITE : read_or_write::READ : read_or_write::WRITE);
}
-template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_view_entry_specific<Level, Width, AddrShift, Endian>::install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_bank *rbank, memory_bank *wbank)
+template<int Level, int Width, int AddrShift> void memory_view_entry_specific<Level, Width, AddrShift>::install_bank_generic(offs_t addrstart, offs_t addrend, offs_t addrmirror, memory_bank *rbank, memory_bank *wbank)
{
VPRINTF("memory_view::install_readwrite_bank(%*x-%*x mirror=%*x, read=\"%s\" / write=\"%s\")\n",
m_addrchars, addrstart, m_addrchars, addrend,
@@ -1030,7 +1014,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
// map the read bank
if (rbank != nullptr)
{
- auto hand_r = new handler_entry_read_memory_bank<Width, AddrShift, Endian>(m_view.m_space, *rbank);
+ auto hand_r = new handler_entry_read_memory_bank<Width, AddrShift>(m_view.m_space, *rbank);
hand_r->set_address_info(nstart, nmask);
r()->populate(nstart, nend, nmirror, hand_r);
}
@@ -1038,7 +1022,7 @@ template<int Level, int Width, int AddrShift, endianness_t Endian> void memory_v
// map the write bank
if (wbank != nullptr)
{
- auto hand_w = new handler_entry_write_memory_bank<Width, AddrShift, Endian>(m_view.m_space, *wbank);
+ auto hand_w = new handler_entry_write_memory_bank<Width, AddrShift>(m_view.m_space, *wbank);
hand_w->set_address_info(nstart, nmask);
w()->populate(nstart, nend, nmirror, hand_w);
}