diff options
author | 2019-01-06 09:09:23 -0500 | |
---|---|---|
committer | 2019-03-01 19:05:45 -0500 | |
commit | be696a321a892f4c792418f3d5018df94168f739 (patch) | |
tree | 7015e26085b6a6ccfea29f8c1c5f03ceb02cbe0a /src/mame/drivers/tutor.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/mame/drivers/tutor.cpp')
-rw-r--r-- | src/mame/drivers/tutor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mame/drivers/tutor.cpp b/src/mame/drivers/tutor.cpp index e17d19012b8..5499cf23f73 100644 --- a/src/mame/drivers/tutor.cpp +++ b/src/mame/drivers/tutor.cpp @@ -296,17 +296,17 @@ READ8_MEMBER( tutor_state::key_r ) char port[12]; uint8_t value; - snprintf(port, ARRAY_LENGTH(port), "LINE%d", offset); + snprintf(port, ARRAY_LENGTH(port), "LINE%d", offset >> 3); value = ioport(port)->read(); /* hack for ports overlapping with joystick */ - if (offset == 4 || offset == 5) + if (offset >= 32 && offset < 48) { - snprintf(port, ARRAY_LENGTH(port), "LINE%d_alt", offset); + snprintf(port, ARRAY_LENGTH(port), "LINE%d_alt", offset >> 3); value |= ioport(port)->read(); } - return value; + return BIT(value, offset & 7); } @@ -600,8 +600,8 @@ void tutor_state::pyuutajr_mem(address_map &map) void tutor_state::tutor_io(address_map &map) { - map(0xec0, 0xec7).r(FUNC(tutor_state::key_r)); /*keyboard interface*/ - map(0xed0, 0xed0).r(FUNC(tutor_state::tutor_cassette_r)); /*cassette interface*/ + map(0xec00, 0xec7f).r(FUNC(tutor_state::key_r)); /*keyboard interface*/ + map(0xed00, 0xed01).r(FUNC(tutor_state::tutor_cassette_r)); /*cassette interface*/ } /* tutor keyboard: 56 keys |