summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-12-09 23:33:57 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-12-09 23:34:05 -0500
commit86603e8692038938d1275bbc7a8808c54b2023b3 (patch)
treefbbbd2ac210e0642b7b1513e7cd95b004bd7469f
parentcd3b77121fa7fdd0540515f9ee471724987680d5 (diff)
z8: Fix typo in pre1_write (restores noise in amerihok); misc. minor cleanups (nw)
-rw-r--r--src/devices/cpu/z8/z8.cpp6
-rw-r--r--src/devices/cpu/z8/z8ops.hxx2
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);