summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author goldnchild <48141308+goldnchild@users.noreply.github.com>2020-08-15 12:22:17 -0700
committer GitHub <noreply@github.com>2020-08-15 15:22:17 -0400
commitfb81629f73ac27b5ad7a2364c678b6931b15d8cb (patch)
tree9069e30bfe6af15d684d89a3cb33b957502ec37c
parentb27ad435a82a373cebc58f0457b3c5c30c8daaa9 (diff)
Ap2000 fixes to get it to start up properly; Also adding green ready led indicator to printhead box to see status. (#7079)
ap2000: Fixes to get it to start up properly - Proper initialization NMI delay - Make printhead display ready status
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp14
-rw-r--r--src/devices/machine/e05a30.h2
2 files changed, 12 insertions, 4 deletions
diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp
index 61c56de45e4..2467406f266 100644
--- a/src/devices/bus/centronics/epson_lx810l.cpp
+++ b/src/devices/bus/centronics/epson_lx810l.cpp
@@ -179,6 +179,8 @@ static INPUT_PORTS_START( epson_lx810l )
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_1_PAD)
+ PORT_START("PAPEREND")
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Paper End Sensor") PORT_CODE(KEYCODE_6_PAD)
/* DIPSW1 */
PORT_START("DIPSW1")
@@ -376,10 +378,11 @@ uint8_t epson_lx810l_device::porta_r(offs_t offset)
{
uint8_t result = 0;
uint8_t hp_sensor = m_cr_pos_abs <= 0 ? 0 : 1;
- uint8_t pe_sensor = m_pf_pos_abs <= 0 ? 1 : 0;
+ //uint8_t pe_sensor = m_pf_pos_abs <= 0 ? 1 : 0;
result |= hp_sensor; /* home position */
- result |= pe_sensor << 1; /* paper end */
+ //result |= pe_sensor << 1; /* paper end */
+ result |= ioport("PAPEREND")->read() << 1; // simulate a paper out error
result |= ioport("LINEFEED")->read() << 6;
result |= ioport("FORMFEED")->read() << 7;
@@ -517,7 +520,8 @@ void epson_lx810l_device::cr_stepper(uint8_t data)
WRITE_LINE_MEMBER( epson_lx810l_device::e05a30_ready )
{
- m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
+ m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::from_double(0.09)); // must be longer than attotime::zero
+ // 0.09 is minimum to initialize properly
}
@@ -531,7 +535,9 @@ uint32_t epson_lx810l_device::screen_update_lx810l(screen_device &screen, bitmap
copyscrollbitmap(bitmap, m_bitmap, 0, nullptr, 1, &scrolly, cliprect);
/* draw "printhead" */
- bitmap.plot_box(m_real_cr_pos + CR_OFFSET - 10, PAPER_HEIGHT - 36, 20, 36, 0x888888);
+ int bordersize = 1;
+ bitmap.plot_box(m_real_cr_pos + CR_OFFSET - 10 - bordersize, PAPER_HEIGHT - 36 - bordersize, 20 + bordersize * 2, 36 + bordersize * 2, 0x000000 );
+ bitmap.plot_box(m_real_cr_pos + CR_OFFSET - 10, PAPER_HEIGHT - 36, 20, 36, m_e05a30->ready_led() ? 0x55ff55 : 0x337733 );
return 0;
}
diff --git a/src/devices/machine/e05a30.h b/src/devices/machine/e05a30.h
index 9ac6cefdae5..5dfb51ac81c 100644
--- a/src/devices/machine/e05a30.h
+++ b/src/devices/machine/e05a30.h
@@ -39,6 +39,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( centronics_input_data6 ) { if (state) m_centronics_data |= 0x40; else m_centronics_data &= ~0x40; }
DECLARE_WRITE_LINE_MEMBER( centronics_input_data7 ) { if (state) m_centronics_data |= 0x80; else m_centronics_data &= ~0x80; }
+ int ready_led() { return !m_centronics_busy; }
+
protected:
// device-level overrides
virtual void device_start() override;