Skip to content

Commit 3206cf2

Browse files
authored
sinclair/sprinter.cpp: Added access to internal z84 IO through the BUS (#14189)
1 parent 022bed2 commit 3206cf2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/mame/sinclair/sprinter.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,6 +1429,19 @@ void sprinter_state::init_taps()
14291429
check_accel(false, offset, data);
14301430
}
14311431
});
1432+
1433+
m_maincpu->space(AS_IO).install_write_tap(0x0000, 0xffff, "cpu_io_w", [this](offs_t offset, u8 &data, u8 mem_mask)
1434+
{
1435+
// Internal z84 ports are not accesable through IO map, hence they need special case here
1436+
static const std::unordered_set<u8> z84_int = {
1437+
0x10, 0x11, 0x12, 0x13,
1438+
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
1439+
0xee, 0xef,
1440+
0xf0, 0xf1, 0xf4
1441+
};
1442+
if (z84_int.find(u8(offset)) != z84_int.end())
1443+
dcp_w(offset, data);
1444+
});
14321445
}
14331446

14341447
void sprinter_state::machine_start()

0 commit comments

Comments
 (0)