From f66d91013668ac87e4ca210e1bdcaf082821723a Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Tue, 8 May 2018 11:13:34 +0200 Subject: [PATCH] Hp ipc kbd fixes (#3533) * Fix ID byte returned during IDD command The ID byte contains the nationality of the Keyboard, so return the value set by the id dipswitch. Signed-off-by: Sven Schnelle * Use LOG() in hlekbd.cpp Signed-off-by: Sven Schnelle --- src/devices/bus/hp_hil/hlekbd.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/devices/bus/hp_hil/hlekbd.cpp b/src/devices/bus/hp_hil/hlekbd.cpp index 16245dc9da3..4249f7a6869 100644 --- a/src/devices/bus/hp_hil/hlekbd.cpp +++ b/src/devices/bus/hp_hil/hlekbd.cpp @@ -3,8 +3,9 @@ #include "hlekbd.h" #include "machine/keyboard.ipp" +//#define VERBOSE 1 +#include "logmacro.h" -#define LOG 0 /*************************************************************************** DEVICE TYPE GLOBALS ***************************************************************************/ @@ -284,10 +285,8 @@ bool hle_device_base::hil_write(uint16_t *pdata) uint8_t data = *pdata & 0xff; bool command = BIT(*pdata, 11); - if (LOG) { - logerror("rx from mlc %04X (%s addr %d, data %02X)\n", *pdata, \ - command ? "command" : "data", addr, data); - } + LOG("rx from mlc %04X (%s addr %d, data %02X)\n", *pdata, + command ? "command" : "data", addr, data); if (!command) goto out; @@ -344,8 +343,7 @@ bool hle_device_base::hil_write(uint16_t *pdata) break; case HPHIL_IDD: - logerror("IDD\n"); - m_hp_hil_mlc->hil_write(0x01cf); + m_hp_hil_mlc->hil_write(0x0100 | ioport("COL0")->read()); m_hp_hil_mlc->hil_write(m_device_id16 | 0); break; @@ -357,7 +355,7 @@ bool hle_device_base::hil_write(uint16_t *pdata) break; default: - logerror("command %02X unknown\n", data); + LOG("command %02X unknown\n", data); break; } out: