diff --git a/src/emu/debug/dvmemory.c b/src/emu/debug/dvmemory.c index 1bf14980893..5aa3929c8a1 100644 --- a/src/emu/debug/dvmemory.c +++ b/src/emu/debug/dvmemory.c @@ -61,7 +61,7 @@ debug_view_memory_source::debug_view_memory_source(const char *name, memory_regi m_memintf(NULL), m_base(region.base()), m_length(region.bytes()), - m_offsetxor(NATIVE_ENDIAN_VALUE_LE_BE(region.bytewidth() - 1, 0)), + m_offsetxor(ENDIAN_VALUE_NE_NNE(region.endianness(), 0, region.bytewidth() - 1)), m_endianness(region.endianness()), m_prefsize(MIN(region.bytewidth(), 8)) { diff --git a/src/emu/emucore.h b/src/emu/emucore.h index 73b9e75d9ca..b078f83b971 100644 --- a/src/emu/emucore.h +++ b/src/emu/emucore.h @@ -239,7 +239,7 @@ inline void operator--(_Type &value, int) { value = (_Type)((int)value - 1); } #define NATIVE_ENDIAN_VALUE_LE_BE(leval,beval) ENDIAN_VALUE_LE_BE(ENDIANNESS_NATIVE, leval, beval) // endian-based value: first value is if 'endian' matches native, second is if 'endian' doesn't match native -#define ENDIAN_VALUE_NE_NNE(endian,leval,beval) (((endian) == ENDIANNESS_NATIVE) ? (neval) : (nneval)) +#define ENDIAN_VALUE_NE_NNE(endian,neval,nneval) (((endian) == ENDIANNESS_NATIVE) ? (neval) : (nneval)) // useful macros to deal with bit shuffling encryptions