summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2014-05-10 14:52:30 +0000
committer cracyc <cracyc@users.noreply.github.com>2014-05-10 14:52:30 +0000
commit37cb3f2686e3193354e1e3c4537204eb3ea71854 (patch)
tree5fa4808901d844dea8e3078b36579fab88f5655b /src/mess
parent61b8bf3e3714968118645bd091e048065039d8c1 (diff)
(mess) tandy2k: use the pc keyboard as a temporary substitute (nw)
Diffstat (limited to 'src/mess')
-rw-r--r--src/mess/drivers/tandy2k.c14
-rw-r--r--src/mess/includes/tandy2k.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/mess/drivers/tandy2k.c b/src/mess/drivers/tandy2k.c
index ce176dff3cc..1a9f00b1250 100644
--- a/src/mess/drivers/tandy2k.c
+++ b/src/mess/drivers/tandy2k.c
@@ -23,6 +23,7 @@
*/
#include "includes/tandy2k.h"
+#include "machine/pckeybrd.h"
#define LOG 1
@@ -134,6 +135,7 @@ WRITE8_MEMBER( tandy2k_state::enable_w )
// keyboard enable
m_kb->power_w(BIT(data, 0));
+ machine().device<pc_keyboard_device>("pc_keyboard")->enable(BIT(data, 0));
// external baud rate clock
m_extclk = BIT(data, 1);
@@ -205,6 +207,8 @@ READ8_MEMBER( tandy2k_state::kbint_clr_r )
{
m_kb->busy_w(1);
m_pic1->ir0_w(CLEAR_LINE);
+
+ return machine().device<pc_keyboard_device>("pc_keyboard")->read(space, 0);
}
return 0xff;
@@ -341,6 +345,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( tandy2k )
// defined in machine/tandy2kb.c
+ PORT_INCLUDE(pc_keyboard)
INPUT_PORTS_END
// Video
@@ -743,6 +748,11 @@ void tandy2k_state::machine_start()
save_item(NAME(m_spkrdata));
}
+void tandy2k_state::device_reset_after_children()
+{
+ machine().device<pc_keyboard_device>("pc_keyboard")->enable(0);
+}
+
// Machine Driver
static MACHINE_CONFIG_START( tandy2k, tandy2k_state )
@@ -847,6 +857,10 @@ static MACHINE_CONFIG_START( tandy2k, tandy2k_state )
MCFG_TANDY2000_KEYBOARD_CLOCK_CALLBACK(WRITELINE(tandy2k_state, kbdclk_w))
MCFG_TANDY2000_KEYBOARD_DATA_CALLBACK(WRITELINE(tandy2k_state, kbddat_w))
+ // temporary until the tandy keyboard has a rom dump
+ MCFG_PC_KEYB_ADD("pc_keyboard", DEVWRITELINE(I8259A_1_TAG, pic8259_device, ir0_w))
+
+
// software lists
MCFG_SOFTWARE_LIST_ADD("flop_list", "tandy2k")
diff --git a/src/mess/includes/tandy2k.h b/src/mess/includes/tandy2k.h
index bcebe4f8559..761d2f0cb37 100644
--- a/src/mess/includes/tandy2k.h
+++ b/src/mess/includes/tandy2k.h
@@ -126,6 +126,8 @@ public:
optional_shared_ptr<UINT8> m_char_ram;
virtual void machine_start();
+ virtual void device_reset_after_children();
+
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void update_drq();