summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author goldnchild <48141308+goldnchild@users.noreply.github.com>2020-08-14 18:00:21 -0700
committer GitHub <noreply@github.com>2020-08-14 21:00:21 -0400
commit5dcef206e23f72d967fbc540bcbe157db594740e (patch)
tree1d5c18e62ccbaef92042240eb122699132e34cc7
parent39a616616052ce43310e5835a7e1dbe7c3fb9e85 (diff)
Some Ap2000 fixes and UPD7810 analog fixes (#7075)
* Upd7810 analog conversion fixes (conversion registers, scan mode) * Epson Ap2000 fixes for controls (remap controls to keypad)
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp8
-rw-r--r--src/devices/cpu/upd7810/upd7810.cpp19
2 files changed, 14 insertions, 13 deletions
diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp
index cc188c8f998..61c56de45e4 100644
--- a/src/devices/bus/centronics/epson_lx810l.cpp
+++ b/src/devices/bus/centronics/epson_lx810l.cpp
@@ -172,13 +172,13 @@ static INPUT_PORTS_START( epson_lx810l )
/* Buttons on printer */
PORT_START("ONLINE")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("On Line") PORT_CODE(KEYCODE_O) PORT_CHANGED_MEMBER(DEVICE_SELF, epson_lx810l_device, online_sw, 0)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("On Line") PORT_CODE(KEYCODE_0_PAD) PORT_CHANGED_MEMBER(DEVICE_SELF, epson_lx810l_device, online_sw, 0)
PORT_START("FORMFEED")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Form Feed") PORT_CODE(KEYCODE_F) PORT_TOGGLE
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Form Feed") PORT_CODE(KEYCODE_7_PAD)
PORT_START("LINEFEED")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line Feed") PORT_CODE(KEYCODE_L) PORT_TOGGLE
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Line Feed") PORT_CODE(KEYCODE_9_PAD)
PORT_START("LOADEJECT")
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load/Eject") PORT_CODE(KEYCODE_E)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Load/Eject") PORT_CODE(KEYCODE_1_PAD)
/* DIPSW1 */
PORT_START("DIPSW1")
diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp
index bd459b2f141..49d3bd5e437 100644
--- a/src/devices/cpu/upd7810/upd7810.cpp
+++ b/src/devices/cpu/upd7810/upd7810.cpp
@@ -1511,10 +1511,10 @@ void upd7810_device::handle_timers(int cycles)
switch (m_adout)
{
// volfied code checks bit 0x80, old code set bit 0x01, TODO: verify which bits are set on real hw
- case 0: CR0 = m_tmpcr ? 0xff:0x00; break;
- case 1: CR1 = m_tmpcr ? 0xff:0x00; break;
- case 2: CR2 = m_tmpcr ? 0xff:0x00; break;
- case 3: CR3 = m_tmpcr ? 0xff:0x00; break;
+ case 0: CR0 = m_tmpcr; break;
+ case 1: CR1 = m_tmpcr; break;
+ case 2: CR2 = m_tmpcr; break;
+ case 3: CR3 = m_tmpcr; break;
}
m_adout = (m_adout + 1) & 0x03;
if (m_adout == 0)
@@ -1545,16 +1545,17 @@ void upd7810_device::handle_timers(int cycles)
m_adcnt -= m_adtot;
switch (m_adout)
{
- case 0: CR0 = m_tmpcr ? 0xff:0x00; break;
- case 1: CR1 = m_tmpcr ? 0xff:0x00; break;
- case 2: CR2 = m_tmpcr ? 0xff:0x00; break;
- case 3: CR3 = m_tmpcr ? 0xff:0x00; break;
+ case 0: CR0 = m_tmpcr; break;
+ case 1: CR1 = m_tmpcr; break;
+ case 2: CR2 = m_tmpcr; break;
+ case 3: CR3 = m_tmpcr; break;
}
- m_adin = (m_adin + 1) & 0x07;
+ m_adin = (m_adin + 1) & 0x03; // should loop from 0 to 3 for AN0-AN3 or AN4-AN7
m_adout = (m_adout + 1) & 0x03;
if (m_adout == 0)
IRR |= INTFAD;
m_shdone = 0;
+
}
}