From dd91d693075bd9a90d6b11fda9d098eb84da0cb6 Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 10 Dec 2014 00:14:37 +0100 Subject: [PATCH] get rid of c_output_pla warning --- src/emu/cpu/tms0980/tms0980.c | 21 ++++++++++----------- src/emu/cpu/tms0980/tms0980.h | 5 +++-- src/mess/drivers/microvsn.c | 8 ++++---- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/emu/cpu/tms0980/tms0980.c b/src/emu/cpu/tms0980/tms0980.c index 9d900209807..531ddc32329 100644 --- a/src/emu/cpu/tms0980/tms0980.c +++ b/src/emu/cpu/tms0980/tms0980.c @@ -397,6 +397,7 @@ void tms1xxx_cpu_device::device_start() m_r = 0; m_o = 0; m_o_latch = 0; + m_o_latch_low = 0; m_cki_bus = 0; m_c4 = 0; m_p = 0; @@ -423,7 +424,7 @@ void tms1xxx_cpu_device::device_start() m_a_prev = m_a; m_r_prev = m_r; - m_o_prev = m_o; + m_o_latch_prev = m_o; // register for savestates save_item(NAME(m_pc)); @@ -439,6 +440,7 @@ void tms1xxx_cpu_device::device_start() save_item(NAME(m_r)); save_item(NAME(m_o)); save_item(NAME(m_o_latch)); + save_item(NAME(m_o_latch_low)); save_item(NAME(m_cki_bus)); save_item(NAME(m_c4)); save_item(NAME(m_p)); @@ -465,7 +467,7 @@ void tms1xxx_cpu_device::device_start() save_item(NAME(m_a_prev)); save_item(NAME(m_r_prev)); - save_item(NAME(m_o_prev)); + save_item(NAME(m_o_latch_prev)); // register state for debugger state_add(TMS0980_PC, "PC", m_pc ).formatstr("%02X"); @@ -511,9 +513,11 @@ void tms1xxx_cpu_device::device_reset() // clear outputs m_r = 0; m_write_r(0, m_r & m_r_mask, 0xffff); + m_o_latch_low = 0; m_o_latch = 0; write_o_output(0); m_write_r(0, m_r & m_r_mask, 0xffff); + m_power_off(0); } @@ -741,10 +745,6 @@ void tms1xxx_cpu_device::write_o_output(UINT8 data) { // a hardcoded table is supported if the output pla is unknown m_o = (c_output_pla == NULL) ? m_opla->read(data) : c_output_pla[data]; - - if ((m_o & 0xff00) == 0xff00) - logerror("unknown output pla mapping for index %02X\n", data); - m_write_o(0, m_o & m_o_mask, 0xffff); } @@ -761,7 +761,7 @@ void tmc0270_cpu_device::dynamic_output() m_a_prev = m_a; m_r_prev = m_r; - m_o_prev = m_o; + m_o_latch_prev = m_o_latch; } @@ -965,8 +965,7 @@ void tms1xxx_cpu_device::op_xda() void tms1xxx_cpu_device::op_off() { - // OFF: request power off - logerror("%s: power-off request\n", tag()); + // OFF: request auto power-off m_power_off(1); } @@ -1000,9 +999,9 @@ void tmc0270_cpu_device::op_tdo() { // TDO: transfer data out if (m_status) - m_o_latch = m_a; + m_o_latch_low = m_a; else - m_o = m_o_latch | (m_a << 4 & 0x30); + m_o_latch = m_o_latch_low | (m_a << 4 & 0x30); // handled further in dynamic_output } diff --git a/src/emu/cpu/tms0980/tms0980.h b/src/emu/cpu/tms0980/tms0980.h index dfbaf22c8c9..09ed4f3d8bc 100644 --- a/src/emu/cpu/tms0980/tms0980.h +++ b/src/emu/cpu/tms0980/tms0980.h @@ -131,8 +131,9 @@ protected: UINT16 m_r; UINT16 m_r_prev; UINT16 m_o; - UINT16 m_o_prev; - UINT16 m_o_latch; // TMC0270 hold latch + UINT8 m_o_latch; // TMC0270 hold latch + UINT8 m_o_latch_low; + UINT8 m_o_latch_prev; UINT8 m_cki_bus; UINT8 m_c4; UINT8 m_p; // 4-bit adder p(lus)-input diff --git a/src/mess/drivers/microvsn.c b/src/mess/drivers/microvsn.c index ef3e4453ae5..0e65684dbe2 100644 --- a/src/mess/drivers/microvsn.c +++ b/src/mess/drivers/microvsn.c @@ -496,8 +496,8 @@ static const UINT16 microvision_output_pla_0[0x20] = /* O output PLA configuration currently unknown */ 0x00, 0x08, 0x04, 0x0C, 0x02, 0x0A, 0x06, 0x0E, 0x01, 0x09, 0x05, 0x0D, 0x03, 0x0B, 0x07, 0x0F, - 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, - 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; @@ -507,8 +507,8 @@ static const UINT16 microvision_output_pla_1[0x20] = /* Reversed bit order */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, - 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00, 0xFF00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };