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 <svens@stackframe.org>

* Use LOG() in hlekbd.cpp

Signed-off-by: Sven Schnelle <svens@stackframe.org>
This commit is contained in:
Sven Schnelle 2018-05-08 11:13:34 +02:00 committed by Vas Crabb
parent ae708bbe08
commit f66d910136

View File

@ -3,8 +3,9 @@
#include "hlekbd.h" #include "hlekbd.h"
#include "machine/keyboard.ipp" #include "machine/keyboard.ipp"
//#define VERBOSE 1
#include "logmacro.h"
#define LOG 0
/*************************************************************************** /***************************************************************************
DEVICE TYPE GLOBALS DEVICE TYPE GLOBALS
***************************************************************************/ ***************************************************************************/
@ -284,10 +285,8 @@ bool hle_device_base::hil_write(uint16_t *pdata)
uint8_t data = *pdata & 0xff; uint8_t data = *pdata & 0xff;
bool command = BIT(*pdata, 11); bool command = BIT(*pdata, 11);
if (LOG) { LOG("rx from mlc %04X (%s addr %d, data %02X)\n", *pdata,
logerror("rx from mlc %04X (%s addr %d, data %02X)\n", *pdata, \ command ? "command" : "data", addr, data);
command ? "command" : "data", addr, data);
}
if (!command) if (!command)
goto out; goto out;
@ -344,8 +343,7 @@ bool hle_device_base::hil_write(uint16_t *pdata)
break; break;
case HPHIL_IDD: case HPHIL_IDD:
logerror("IDD\n"); m_hp_hil_mlc->hil_write(0x0100 | ioport("COL0")->read());
m_hp_hil_mlc->hil_write(0x01cf);
m_hp_hil_mlc->hil_write(m_device_id16 | 0); m_hp_hil_mlc->hil_write(m_device_id16 | 0);
break; break;
@ -357,7 +355,7 @@ bool hle_device_base::hil_write(uint16_t *pdata)
break; break;
default: default:
logerror("command %02X unknown\n", data); LOG("command %02X unknown\n", data);
break; break;
} }
out: out: