diff options
author | Olivier Galibert <galibert@pobox.com> | 2018-05-14 07:19:07 +0200 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2018-05-14 07:20:49 +0200 |
commit | 1af6bdd9526c2bf5e324ff265b9f532da7c22a7a (patch) | |
tree | 7bcc8985ab287fa54ab3deb1a9b7443a8bd5e583 /src/devices/cpu | |
parent | b3ae5e6a7f5f485172031b71affbeb60ee437750 (diff) |
Fix hyperstone drc (nw)
Diffstat (limited to 'src/devices/cpu')
-rw-r--r-- | src/devices/cpu/e132xs/e132xs.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp index 31e9e1fa3c5..a4e14e15af0 100644 --- a/src/devices/cpu/e132xs/e132xs.cpp +++ b/src/devices/cpu/e132xs/e132xs.cpp @@ -1133,16 +1133,18 @@ void hyperstone_device::init(int scale_mask) { auto cache = m_program->cache<2, 0, ENDIANNESS_BIG>(); m_pr16 = [cache](offs_t address) -> u16 { return cache->read_word(address); }; - if (ENDIANNESS_NATIVE != ENDIANNESS_LITTLE) + if (ENDIANNESS_NATIVE != ENDIANNESS_BIG) m_prptr = [cache](offs_t address) -> const void * { const u16 *ptr = static_cast<u16 *>(cache->read_ptr(address & ~3)); - ptr += (~address >> 1) & 3; + if(!(address & 2)) + ptr++; return ptr; }; else m_prptr = [cache](offs_t address) -> const void * { const u16 *ptr = static_cast<u16 *>(cache->read_ptr(address & ~3)); - ptr += (address >> 1) & 3; + if(address & 2) + ptr++; return ptr; }; } |