diff options
author | 2019-01-06 09:09:23 -0500 | |
---|---|---|
committer | 2019-03-01 19:05:45 -0500 | |
commit | be696a321a892f4c792418f3d5018df94168f739 (patch) | |
tree | 7015e26085b6a6ccfea29f8c1c5f03ceb02cbe0a /src/devices/machine/tms9901.cpp | |
parent | eb1b8e58e2245c9a2a5b910135f6f71e86d4844f (diff) |
tms9900, tms9980a, tms9995: CRU addressing change
- Shift all CRU addresses by 1 in memory maps. This makes CRU addressing more consistent with both register values and external address lines. (CRUOUT is multiplexed with the lowest address line on the 8-bit bus versions.)
- Addressing for CRU read accesses is now the same as it has been for CRU write accesses: one address for each bit. This simplifies the CPU cores (which were already emulating bit access times), though it means some read handlers now have to do some additional work.
- CRU space is now little-endian, despite the big-endian memory organization, because less significant bits correspond to lower CRU addresses.
Diffstat (limited to 'src/devices/machine/tms9901.cpp')
-rw-r--r-- | src/devices/machine/tms9901.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/machine/tms9901.cpp b/src/devices/machine/tms9901.cpp index af01c6ac7fe..aadfec82f20 100644 --- a/src/devices/machine/tms9901.cpp +++ b/src/devices/machine/tms9901.cpp @@ -279,9 +279,9 @@ READ8_MEMBER( tms9901_device::read ) { int answer = 0; - offset &= 0x003; + offset &= 0x01f; - switch (offset) + switch (offset >> 3) { case 0: if (m_clock_mode) @@ -356,7 +356,7 @@ READ8_MEMBER( tms9901_device::read ) break; } - return answer; + return BIT(answer, offset & 7); } /* |