diff --git a/.gitattributes b/.gitattributes index 17c4c960f83..56f3816bc53 100644 --- a/.gitattributes +++ b/.gitattributes @@ -727,6 +727,8 @@ src/emu/bus/centronics/ctronics.c svneol=native#text/plain src/emu/bus/centronics/ctronics.h svneol=native#text/plain src/emu/bus/centronics/dsjoy.c svneol=native#text/plain src/emu/bus/centronics/dsjoy.h svneol=native#text/plain +src/emu/bus/centronics/epson_lx800.c svneol=native#text/plain +src/emu/bus/centronics/epson_lx800.h svneol=native#text/plain src/emu/bus/centronics/printer.c svneol=native#text/plain src/emu/bus/centronics/printer.h svneol=native#text/plain src/emu/bus/coco/coco_232.c svneol=native#text/plain @@ -2407,6 +2409,7 @@ src/emu/layout/dualhuov.lay svneol=native#text/xml src/emu/layout/horizont.lay svneol=native#text/xml src/emu/layout/lcd.lay svneol=native#text/xml src/emu/layout/lcd_rot.lay svneol=native#text/xml +src/emu/layout/lx800.lay svneol=native#text/xml src/emu/layout/noscreens.lay svneol=native#text/xml src/emu/layout/quadhsxs.lay svneol=native#text/xml src/emu/layout/snap.lay svneol=native#text/xml @@ -8013,7 +8016,6 @@ src/mess/drivers/lisa.c svneol=native#text/plain src/mess/drivers/llc.c svneol=native#text/plain src/mess/drivers/lola8a.c svneol=native#text/plain src/mess/drivers/lviv.c svneol=native#text/plain -src/mess/drivers/lx800.c svneol=native#text/plain src/mess/drivers/lynx.c svneol=native#text/plain src/mess/drivers/m20.c svneol=native#text/plain src/mess/drivers/m5.c svneol=native#text/plain @@ -8608,7 +8610,6 @@ src/mess/layout/k1003.lay svneol=native#text/xml src/mess/layout/kim1.lay svneol=native#text/xml src/mess/layout/lc80.lay svneol=native#text/xml src/mess/layout/llc1.lay svneol=native#text/xml -src/mess/layout/lx800.lay svneol=native#text/xml src/mess/layout/lynx.lay svneol=native#text/xml src/mess/layout/mac.lay svneol=native#text/xml src/mess/layout/megacd.lay svneol=native#text/xml diff --git a/src/emu/bus/bus.mak b/src/emu/bus/bus.mak index ff23b708922..997e1993924 100644 --- a/src/emu/bus/bus.mak +++ b/src/emu/bus/bus.mak @@ -738,7 +738,9 @@ BUSOBJS += $(BUSOBJ)/centronics/ctronics.o BUSOBJS += $(BUSOBJ)/centronics/comxpl80.o BUSOBJS += $(BUSOBJ)/centronics/covox.o BUSOBJS += $(BUSOBJ)/centronics/dsjoy.o +BUSOBJS += $(BUSOBJ)/centronics/epson_lx800.o BUSOBJS += $(BUSOBJ)/centronics/printer.o +$(BUSOBJ)/centronics/epson_lx800.o: $(EMUOBJ)/layout/lx800.lh endif #------------------------------------------------- diff --git a/src/emu/bus/centronics/ctronics.c b/src/emu/bus/centronics/ctronics.c index 67041e20afa..3ce90d553d7 100644 --- a/src/emu/bus/centronics/ctronics.c +++ b/src/emu/bus/centronics/ctronics.c @@ -116,8 +116,14 @@ device_centronics_peripheral_interface::~device_centronics_peripheral_interface( } +#include "comxpl80.h" +#include "epson_lx800.h" #include "printer.h" SLOT_INTERFACE_START(centronics_printers) + SLOT_INTERFACE("pl80", COMX_PL80) + SLOT_INTERFACE("lx800", EPSON_LX800) + SLOT_INTERFACE("lx810l", EPSON_LX810L) + SLOT_INTERFACE("ap2000", EPSON_AP2000) SLOT_INTERFACE("printer", CENTRONICS_PRINTER) SLOT_INTERFACE_END diff --git a/src/mess/drivers/lx800.c b/src/emu/bus/centronics/epson_lx800.c similarity index 54% rename from src/mess/drivers/lx800.c rename to src/emu/bus/centronics/epson_lx800.c index 2db9e2738ff..784ac20bfaf 100644 --- a/src/mess/drivers/lx800.c +++ b/src/emu/bus/centronics/epson_lx800.c @@ -1,6 +1,8 @@ -/*************************************************************************** +// license:MAME, GPL-2.0+ +// copyright-holders:Dirk Best +/********************************************************************** - Epson LX-800 dot matrix printer + Epson LX-800 dot matrix printer license: MAME, GPL-2.0+ copyright-holders: Dirk Best @@ -26,188 +28,87 @@ 2014-06-10 Added AP2000, gets caught in the same place as LX810L. +**********************************************************************/ -***************************************************************************/ - -#include "emu.h" -#include "cpu/upd7810/upd7810.h" -#include "machine/e05a03.h" -#include "sound/beep.h" +#include "epson_lx800.h" #include "lx800.lh" -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ -class lx800_state : public driver_device +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type EPSON_LX800 = &device_creator; +const device_type EPSON_LX810L = &device_creator; +const device_type EPSON_AP2000 = &device_creator; + + +//------------------------------------------------- +// ROM( lx800 ) +//------------------------------------------------- + +ROM_START( lx800 ) + ROM_REGION(0x8000, "maincpu", 0) + ROM_LOAD("lx800.ic3c", 0x0000, 0x8000, CRC(da06c45b) SHA1(9618c940dd10d5b43cd1edd5763b90e6447de667) ) +ROM_END + + +//------------------------------------------------- +// ROM( lx810l ) +//------------------------------------------------- + +ROM_START( lx810l ) + ROM_REGION(0x8000, "maincpu", 0) + ROM_LOAD("lx810l.ic3c", 0x0000, 0x8000, CRC(a66454e1) SHA1(8e6f2f98abcbd8af6e34b9ba746edf0d18aef843) ) +ROM_END + + +//------------------------------------------------- +// ROM( ap2000 ) +//------------------------------------------------- + +ROM_START( ap2000 ) + ROM_REGION(0x8000, "maincpu", 0) + ROM_LOAD("ap2k.ic3c", 0x0000, 0x8000, CRC(ee7294b7) SHA1(219ffa6ff661ce95d5772c9fc1967093718f04e9) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *epson_lx800_t::device_rom_region() const { -public: - lx800_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_beep(*this, "beeper") - { } - - DECLARE_READ8_MEMBER(lx800_porta_r); - DECLARE_WRITE8_MEMBER(lx800_porta_w); - DECLARE_READ8_MEMBER(lx800_portc_r); - DECLARE_WRITE8_MEMBER(lx800_portc_w); - DECLARE_READ8_MEMBER(lx800_centronics_data_r); - DECLARE_WRITE_LINE_MEMBER(lx800_centronics_pe_w); - DECLARE_WRITE_LINE_MEMBER(lx800_paperempty_led_w); - DECLARE_WRITE_LINE_MEMBER(lx800_reset_w); - DECLARE_READ_LINE_MEMBER(an0_r); - DECLARE_READ_LINE_MEMBER(an1_r); - DECLARE_READ_LINE_MEMBER(an2_r); - DECLARE_READ_LINE_MEMBER(an3_r); - DECLARE_READ_LINE_MEMBER(an4_r); - DECLARE_READ_LINE_MEMBER(an5_r); -private: - required_device m_maincpu; - required_device m_beep; - virtual void machine_start(); -}; - - -/*************************************************************************** - I/O PORTS -***************************************************************************/ - -/* PA0 W CRCOM carriage motor, 0 = holding voltage, 1 = drive voltage - * PA1 not used - * PA2 W PFCOM paper feed motor, 0 = holding voltage, 1 = drive voltage - * PA3 R LF SW line feed switch - * PA4 R FF SW form feed switch - * PA5 R PE SW paper end sensor, 0 = no paper, 1 = paper - * PA6 not used - * PA7 R P/S P/S signal from the optional interface - */ -READ8_MEMBER( lx800_state::lx800_porta_r ) -{ - UINT8 result = 0; - - logerror("%s: lx800_porta_r(%02x)\n", machine().describe_context(), offset); - - result |= ioport("LINEFEED")->read() << 3; - result |= ioport("FORMFEED")->read() << 4; - result |= 1 << 5; - - result |= 1 << 7; - - return result; -} - -WRITE8_MEMBER( lx800_state::lx800_porta_w ) -{ - logerror("%s: lx800_porta_w(%02x): %02x\n", machine().describe_context(), offset, data); - logerror("--> carriage: %d, paper feed: %d\n", BIT(data, 0), BIT(data, 2)); -} - -/* PC0 W TXD serial i/o txd - * PC1 R RXD serial i/o rxd - * PC2 W ONLINE LP online led - * PC3 R ONLINE SW online switch - * PC4 W ERR centronics error - * PC5 W ACK centronics acknowledge - * PC6 W FIRE drive pulse width signal - * PC7 W BUZZER buzzer signal - */ -READ8_MEMBER( lx800_state::lx800_portc_r ) -{ - UINT8 result = 0; - - logerror("%s: lx800_portc_r(%02x)\n", machine().describe_context(), offset); - - result |= ioport("ONLINE")->read() << 3; - - return result; -} - -WRITE8_MEMBER( lx800_state::lx800_portc_w ) -{ - logerror("%s: lx800_portc_w(%02x): %02x\n", machine().describe_context(), offset, data); - logerror("--> err: %d, ack: %d, fire: %d, buzzer: %d\n", BIT(data, 4), BIT(data, 5), BIT(data, 6), BIT(data, 7)); - - output_set_value("online_led", !BIT(data, 2)); - m_beep->set_state(!BIT(data, 7)); -} - -READ_LINE_MEMBER( lx800_state::an0_r ) -{ - return BIT(ioport("DIPSW2")->read(), 0); -} - -READ_LINE_MEMBER( lx800_state::an1_r ) -{ - return BIT(ioport("DIPSW2")->read(), 1); -} - -READ_LINE_MEMBER( lx800_state::an2_r ) -{ - return BIT(ioport("DIPSW2")->read(), 2); -} - -READ_LINE_MEMBER( lx800_state::an3_r ) -{ - return BIT(ioport("DIPSW2")->read(), 3); // can also read an external line AUTO_FEED_XT -} - -READ_LINE_MEMBER( lx800_state::an4_r ) -{ - return 0; // Printer select line (0=always selected) -} - -READ_LINE_MEMBER( lx800_state::an5_r ) -{ - return 1; // Monitors 24v line, should return 4.08 volts + return ROM_NAME( lx800 ); } -/*************************************************************************** - GATE ARRAY -***************************************************************************/ +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- -READ8_MEMBER( lx800_state::lx800_centronics_data_r ) +const rom_entry *epson_lx810l_t::device_rom_region() const { - logerror("centronics: data read\n"); - return 0x55; -} - -WRITE_LINE_MEMBER( lx800_state::lx800_centronics_pe_w ) -{ - logerror("centronics: pe = %d\n", state); -} - -WRITE_LINE_MEMBER( lx800_state::lx800_paperempty_led_w ) -{ - logerror("setting paperout led: %d\n", state); - output_set_value("paperout_led", state); -} - -WRITE_LINE_MEMBER( lx800_state::lx800_reset_w ) -{ - logerror("cpu reset"); - m_maincpu->reset(); + return ROM_NAME( lx810l ); } -/*************************************************************************** - MACHINE EMULATION -***************************************************************************/ +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- -void lx800_state::machine_start() +const rom_entry *epson_ap2000_t::device_rom_region() const { - m_beep->set_state(0); - m_beep->set_frequency(4000); /* ? */ + return ROM_NAME( ap2000 ); } -/*************************************************************************** - ADDRESS MAPS -***************************************************************************/ +//------------------------------------------------- +// ADDRESS_MAP( lx800_mem ) +//------------------------------------------------- -static ADDRESS_MAP_START( lx800_mem, AS_PROGRAM, 8, lx800_state ) +static ADDRESS_MAP_START( lx800_mem, AS_PROGRAM, 8, epson_lx800_t ) AM_RANGE(0x0000, 0x7fff) AM_ROM /* 32k firmware */ AM_RANGE(0x8000, 0x9fff) AM_RAM /* 8k external RAM */ AM_RANGE(0xa000, 0xbfff) AM_NOP /* not used */ @@ -216,18 +117,66 @@ static ADDRESS_MAP_START( lx800_mem, AS_PROGRAM, 8, lx800_state ) AM_RANGE(0xff00, 0xffff) AM_RAM /* internal CPU RAM */ ADDRESS_MAP_END -static ADDRESS_MAP_START( lx800_io, AS_IO, 8, lx800_state ) - AM_RANGE(UPD7810_PORTA, UPD7810_PORTA) AM_READWRITE(lx800_porta_r, lx800_porta_w) + +//------------------------------------------------- +// ADDRESS_MAP( lx800_io ) +//------------------------------------------------- + +static ADDRESS_MAP_START( lx800_io, AS_IO, 8, epson_lx800_t ) + AM_RANGE(UPD7810_PORTA, UPD7810_PORTA) AM_READWRITE(porta_r, porta_w) AM_RANGE(UPD7810_PORTB, UPD7810_PORTB) AM_READ_PORT("DIPSW1") - AM_RANGE(UPD7810_PORTC, UPD7810_PORTC) AM_READWRITE(lx800_portc_r, lx800_portc_w) + AM_RANGE(UPD7810_PORTC, UPD7810_PORTC) AM_READWRITE(portc_r, portc_w) ADDRESS_MAP_END -/*************************************************************************** - INPUT PORTS -***************************************************************************/ +//------------------------------------------------- +// MACHINE_DRIVER( epson_lx800 ) +//------------------------------------------------- -static INPUT_PORTS_START( lx800 ) +static MACHINE_CONFIG_FRAGMENT( epson_lx800 ) + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", UPD7810, XTAL_14_7456MHz) + MCFG_CPU_PROGRAM_MAP(lx800_mem) + MCFG_CPU_IO_MAP(lx800_io) + MCFG_UPD7810_AN0(READLINE(epson_lx800_t, an0_r)) + MCFG_UPD7810_AN1(READLINE(epson_lx800_t, an1_r)) + MCFG_UPD7810_AN2(READLINE(epson_lx800_t, an2_r)) + MCFG_UPD7810_AN3(READLINE(epson_lx800_t, an3_r)) + MCFG_UPD7810_AN4(READLINE(epson_lx800_t, an4_r)) + MCFG_UPD7810_AN5(READLINE(epson_lx800_t, an5_r)) + + MCFG_DEFAULT_LAYOUT(layout_lx800) + + /* audio hardware */ + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("beeper", BEEP, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05) + + /* gate array */ + MCFG_DEVICE_ADD("ic3b", E05A03, 0) + MCFG_E05A03_PE_LP_CALLBACK(WRITELINE(epson_lx800_t, paperempty_led_w)) + MCFG_E05A03_RESO_CALLBACK(WRITELINE(epson_lx800_t, reset_w)) + MCFG_E05A03_PE_CALLBACK(WRITELINE(epson_lx800_t, centronics_pe_w)) + MCFG_E05A03_DATA_CALLBACK(READ8(epson_lx800_t, centronics_data_r)) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor epson_lx800_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( epson_lx800 ); +} + + +//------------------------------------------------- +// INPUT_PORTS( epson_lx800 ) +//------------------------------------------------- + +INPUT_PORTS_START( epson_lx800 ) PORT_START("ONLINE") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("On Line") PORT_CODE(KEYCODE_O) @@ -289,63 +238,176 @@ static INPUT_PORTS_START( lx800 ) INPUT_PORTS_END -/*************************************************************************** - MACHINE DRIVERS -***************************************************************************/ +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- -static MACHINE_CONFIG_START( lx800, lx800_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", UPD7810, XTAL_14_7456MHz) - MCFG_CPU_PROGRAM_MAP(lx800_mem) - MCFG_CPU_IO_MAP(lx800_io) - MCFG_UPD7810_AN0(READLINE(lx800_state, an0_r)) - MCFG_UPD7810_AN1(READLINE(lx800_state, an1_r)) - MCFG_UPD7810_AN2(READLINE(lx800_state, an2_r)) - MCFG_UPD7810_AN3(READLINE(lx800_state, an3_r)) - MCFG_UPD7810_AN4(READLINE(lx800_state, an4_r)) - MCFG_UPD7810_AN5(READLINE(lx800_state, an5_r)) +ioport_constructor epson_lx800_t::device_input_ports() const +{ + return INPUT_PORTS_NAME( epson_lx800 ); +} - MCFG_DEFAULT_LAYOUT(layout_lx800) - /* audio hardware */ - MCFG_SPEAKER_STANDARD_MONO("mono") - MCFG_SOUND_ADD("beeper", BEEP, 0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.05) - /* gate array */ - MCFG_DEVICE_ADD("ic3b", E05A03, 0) - MCFG_E05A03_PE_LP_CALLBACK(WRITELINE(lx800_state, lx800_paperempty_led_w)) - MCFG_E05A03_RESO_CALLBACK(WRITELINE(lx800_state, lx800_reset_w)) - MCFG_E05A03_PE_CALLBACK(WRITELINE(lx800_state, lx800_centronics_pe_w)) - MCFG_E05A03_DATA_CALLBACK(READ8(lx800_state, lx800_centronics_data_r)) -MACHINE_CONFIG_END +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// epson_lx800_t - constructor +//------------------------------------------------- + +epson_lx800_t::epson_lx800_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, EPSON_LX800, "Epson LX-800", tag, owner, clock, "lx800", __FILE__), + device_centronics_peripheral_interface(mconfig, *this), + m_maincpu(*this, "maincpu"), + m_beep(*this, "beeper") +{ +} + +epson_lx800_t::epson_lx800_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : + device_t(mconfig, type, name, tag, owner, clock, shortname, __FILE__), + device_centronics_peripheral_interface(mconfig, *this), + m_maincpu(*this, "maincpu"), + m_beep(*this, "beeper") +{ +} + +epson_lx810l_t::epson_lx810l_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : epson_lx800_t(mconfig, EPSON_LX810L, "Epson LX-810L", tag, owner, clock, "lx810l", __FILE__) { } + +epson_ap2000_t::epson_ap2000_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : epson_lx800_t(mconfig, EPSON_AP2000, "Epson ActionPrinter 2000", tag, owner, clock, "ap2000", __FILE__) { } + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void epson_lx800_t::device_start() +{ + m_beep->set_state(0); + m_beep->set_frequency(4000); /* ? */ +} /*************************************************************************** - ROM DEFINITIONS + I/O PORTS ***************************************************************************/ -ROM_START( lx800 ) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("lx800.ic3c", 0x0000, 0x8000, CRC(da06c45b) SHA1(9618c940dd10d5b43cd1edd5763b90e6447de667) ) -ROM_END +/* PA0 W CRCOM carriage motor, 0 = holding voltage, 1 = drive voltage + * PA1 not used + * PA2 W PFCOM paper feed motor, 0 = holding voltage, 1 = drive voltage + * PA3 R LF SW line feed switch + * PA4 R FF SW form feed switch + * PA5 R PE SW paper end sensor, 0 = no paper, 1 = paper + * PA6 not used + * PA7 R P/S P/S signal from the optional interface + */ +READ8_MEMBER( epson_lx800_t::porta_r ) +{ + UINT8 result = 0; -ROM_START( lx810l ) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("lx810l.ic3c", 0x0000, 0x8000, CRC(a66454e1) SHA1(8e6f2f98abcbd8af6e34b9ba746edf0d18aef843) ) -ROM_END + logerror("%s: lx800_porta_r(%02x)\n", machine().describe_context(), offset); -ROM_START( ap2000 ) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("ap2k.ic3c", 0x0000, 0x8000, CRC(ee7294b7) SHA1(219ffa6ff661ce95d5772c9fc1967093718f04e9) ) -ROM_END + result |= ioport("LINEFEED")->read() << 3; + result |= ioport("FORMFEED")->read() << 4; + result |= 1 << 5; + + result |= 1 << 7; + + return result; +} + +WRITE8_MEMBER( epson_lx800_t::porta_w ) +{ + logerror("%s: lx800_porta_w(%02x): %02x\n", machine().describe_context(), offset, data); + logerror("--> carriage: %d, paper feed: %d\n", BIT(data, 0), BIT(data, 2)); +} + +/* PC0 W TXD serial i/o txd + * PC1 R RXD serial i/o rxd + * PC2 W ONLINE LP online led + * PC3 R ONLINE SW online switch + * PC4 W ERR centronics error + * PC5 W ACK centronics acknowledge + * PC6 W FIRE drive pulse width signal + * PC7 W BUZZER buzzer signal + */ +READ8_MEMBER( epson_lx800_t::portc_r ) +{ + UINT8 result = 0; + + logerror("%s: lx800_portc_r(%02x)\n", machine().describe_context(), offset); + + result |= ioport("ONLINE")->read() << 3; + + return result; +} + +WRITE8_MEMBER( epson_lx800_t::portc_w ) +{ + logerror("%s: lx800_portc_w(%02x): %02x\n", machine().describe_context(), offset, data); + logerror("--> err: %d, ack: %d, fire: %d, buzzer: %d\n", BIT(data, 4), BIT(data, 5), BIT(data, 6), BIT(data, 7)); + + output_set_value("online_led", !BIT(data, 2)); + m_beep->set_state(!BIT(data, 7)); +} + +READ_LINE_MEMBER( epson_lx800_t::an0_r ) +{ + return BIT(ioport("DIPSW2")->read(), 0); +} + +READ_LINE_MEMBER( epson_lx800_t::an1_r ) +{ + return BIT(ioport("DIPSW2")->read(), 1); +} + +READ_LINE_MEMBER( epson_lx800_t::an2_r ) +{ + return BIT(ioport("DIPSW2")->read(), 2); +} + +READ_LINE_MEMBER( epson_lx800_t::an3_r ) +{ + return BIT(ioport("DIPSW2")->read(), 3); // can also read an external line AUTO_FEED_XT +} + +READ_LINE_MEMBER( epson_lx800_t::an4_r ) +{ + return 0; // Printer select line (0=always selected) +} + +READ_LINE_MEMBER( epson_lx800_t::an5_r ) +{ + return 1; // Monitors 24v line, should return 4.08 volts +} /*************************************************************************** - GAME DRIVERS + GATE ARRAY ***************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ -COMP( 1987, lx800, 0, 0, lx800, lx800, driver_device, 0, "Epson", "LX-800 Printer", GAME_NOT_WORKING ) -COMP( 19??, lx810l,lx800, 0, lx800, lx800, driver_device, 0, "Epson", "LX-810L Printer", GAME_NOT_WORKING ) -COMP( 19??, ap2000,lx800, 0, lx800, lx800, driver_device, 0, "Epson", "Action Printer 2000", GAME_NOT_WORKING ) +READ8_MEMBER( epson_lx800_t::centronics_data_r ) +{ + logerror("centronics: data read\n"); + return 0x55; +} + +WRITE_LINE_MEMBER( epson_lx800_t::centronics_pe_w ) +{ + logerror("centronics: pe = %d\n", state); +} + +WRITE_LINE_MEMBER( epson_lx800_t::paperempty_led_w ) +{ + logerror("setting paperout led: %d\n", state); + output_set_value("paperout_led", state); +} + +WRITE_LINE_MEMBER( epson_lx800_t::reset_w ) +{ + logerror("cpu reset"); + m_maincpu->reset(); +} diff --git a/src/emu/bus/centronics/epson_lx800.h b/src/emu/bus/centronics/epson_lx800.h new file mode 100644 index 00000000000..88c2eb3ec69 --- /dev/null +++ b/src/emu/bus/centronics/epson_lx800.h @@ -0,0 +1,103 @@ +// license:MAME, GPL-2.0+ +// copyright-holders:Dirk Best +/********************************************************************** + + Epson LX-800 dot matrix printer emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __EPSON_LX800__ +#define __EPSON_LX800__ + +#include "emu.h" +#include "ctronics.h" +#include "cpu/upd7810/upd7810.h" +#include "machine/e05a03.h" +#include "sound/beep.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> epson_lx800_t + +class epson_lx800_t : public device_t, + public device_centronics_peripheral_interface +{ +public: + // construction/destruction + epson_lx800_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + epson_lx800_t(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + + // optional information overrides + virtual const rom_entry *device_rom_region() const; + virtual machine_config_constructor device_mconfig_additions() const; + virtual ioport_constructor device_input_ports() const; + + DECLARE_READ8_MEMBER(porta_r); + DECLARE_WRITE8_MEMBER(porta_w); + DECLARE_READ8_MEMBER(portc_r); + DECLARE_WRITE8_MEMBER(portc_w); + DECLARE_READ8_MEMBER(centronics_data_r); + DECLARE_WRITE_LINE_MEMBER(centronics_pe_w); + DECLARE_WRITE_LINE_MEMBER(paperempty_led_w); + DECLARE_WRITE_LINE_MEMBER(reset_w); + DECLARE_READ_LINE_MEMBER(an0_r); + DECLARE_READ_LINE_MEMBER(an1_r); + DECLARE_READ_LINE_MEMBER(an2_r); + DECLARE_READ_LINE_MEMBER(an3_r); + DECLARE_READ_LINE_MEMBER(an4_r); + DECLARE_READ_LINE_MEMBER(an5_r); + +protected: + // device-level overrides + virtual void device_start(); + +private: + required_device m_maincpu; + required_device m_beep; +}; + + +// ======================> epson_lx810l_t + +class epson_lx810l_t : public epson_lx800_t +{ +public: + // construction/destruction + epson_lx810l_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual const rom_entry *device_rom_region() const; +}; + + +// ======================> epson_ap2000_t + +class epson_ap2000_t : public epson_lx800_t +{ +public: + // construction/destruction + epson_ap2000_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual const rom_entry *device_rom_region() const; +}; + + + +// device type definition +extern const device_type EPSON_LX800; +extern const device_type EPSON_LX810L; +extern const device_type EPSON_AP2000; + + + +#endif diff --git a/src/mess/layout/lx800.lay b/src/emu/layout/lx800.lay similarity index 100% rename from src/mess/layout/lx800.lay rename to src/emu/layout/lx800.lay diff --git a/src/mess/mess.lst b/src/mess/mess.lst index c3a7e53486c..7f4da6ad789 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -1986,9 +1986,6 @@ fanucs15 // 1990 //********** Misc ********************************************************** ex800 // Epson EX-800 printer -lx800 // Epson LX-800 printer -lx810l // Epson LX-810L printer -ap2000 // Epson Action Printer 2000 ssem // Manchester Small-Scale Experimental Machine, "Baby" craft // Craft, by [lft] diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 8f65a7a275c..17edcb23657 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -1268,7 +1268,6 @@ $(MESSOBJ)/epoch.a: \ $(MESSOBJ)/epson.a: \ $(MESS_DRIVERS)/ex800.o \ $(MESS_DRIVERS)/hx20.o \ - $(MESS_DRIVERS)/lx800.o \ $(MESS_MACHINE)/e05a03.o \ $(MESS_DRIVERS)/px4.o \ $(MESS_DRIVERS)/px8.o \ @@ -2286,7 +2285,6 @@ $(MESS_DRIVERS)/junior.o: $(MESS_LAYOUT)/junior.lh $(MESS_DRIVERS)/lc80.o: $(MESS_LAYOUT)/lc80.lh $(MESS_DRIVERS)/llc.o: $(MESS_LAYOUT)/llc1.lh $(MESS_DRIVERS)/lynx.o: $(MESS_LAYOUT)/lynx.lh -$(MESS_DRIVERS)/lx800.o: $(MESS_LAYOUT)/lx800.lh $(MESS_DRIVERS)/mac.o: $(MESS_LAYOUT)/mac.lh $(MESS_MACHINE)/megacd.o: $(MESS_LAYOUT)/megacd.lh $(MESS_DRIVERS)/mekd2.o: $(MESS_LAYOUT)/mekd2.lh