From 86603e8692038938d1275bbc7a8808c54b2023b3 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 9 Dec 2018 23:33:57 -0500 Subject: z8: Fix typo in pre1_write (restores noise in amerihok); misc. minor cleanups (nw) --- src/devices/cpu/z8/z8.cpp | 6 +++--- src/devices/cpu/z8/z8ops.hxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp index 633a2252988..d5e19fe831f 100644 --- a/src/devices/cpu/z8/z8.cpp +++ b/src/devices/cpu/z8/z8.cpp @@ -435,14 +435,13 @@ uint8_t z8_device::p3_read() void z8_device::p3_write(uint8_t data) { - uint8_t mask = 0; + uint8_t mask = 0xf0; m_output[3] = data; // TODO: special port 3 modes //if (!(m_p3m & 0x7c)) //{ - mask = 0xf0; //} if (mask) @@ -511,7 +510,7 @@ void z8_device::pre0_write(uint8_t data) void z8_device::pre1_write(uint8_t data) { - m_pre[0] = data; + m_pre[1] = data; } void z8_device::p01m_write(uint8_t data) @@ -1153,6 +1152,7 @@ void z8_device::device_reset() p01m_write(0x4d); p2m_write(0xff); p3m_write(0x00); + p3_write(m_output[3] | 0xf0); m_pre[0] &= ~Z8_PRE0_COUNT_MODULO_N; m_pre[1] &= ~(Z8_PRE1_COUNT_MODULO_N | Z8_PRE1_INTERNAL_CLOCK); diff --git a/src/devices/cpu/z8/z8ops.hxx b/src/devices/cpu/z8/z8ops.hxx index d80988029a5..851a427fd41 100644 --- a/src/devices/cpu/z8/z8ops.hxx +++ b/src/devices/cpu/z8/z8ops.hxx @@ -37,7 +37,7 @@ _func(dst, src); #define mode_IR2_R1(_func) \ - uint8_t src = register_read(read(R));\ + uint8_t src = read(read(R));\ uint8_t dst = R;\ _func(dst, src); -- cgit v1.2.3