(MESS) ex800: Refactored Epson EX-800 from a driver into a Centronics device. (nw)

This commit is contained in:
Curt Coder 2014-06-11 12:04:35 +00:00
parent 2030df63b2
commit 3b37f871b7
10 changed files with 338 additions and 221 deletions

5
.gitattributes vendored
View File

@ -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/ctronics.h svneol=native#text/plain
src/emu/bus/centronics/dsjoy.c 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/dsjoy.h svneol=native#text/plain
src/emu/bus/centronics/epson_ex800.c svneol=native#text/plain
src/emu/bus/centronics/epson_ex800.h svneol=native#text/plain
src/emu/bus/centronics/epson_lx800.c 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/epson_lx800.h svneol=native#text/plain
src/emu/bus/centronics/printer.c svneol=native#text/plain src/emu/bus/centronics/printer.c svneol=native#text/plain
@ -2406,6 +2408,7 @@ src/emu/ioport.h svneol=native#text/plain
src/emu/layout/dualhovu.lay svneol=native#text/xml src/emu/layout/dualhovu.lay svneol=native#text/xml
src/emu/layout/dualhsxs.lay svneol=native#text/xml src/emu/layout/dualhsxs.lay svneol=native#text/xml
src/emu/layout/dualhuov.lay svneol=native#text/xml src/emu/layout/dualhuov.lay svneol=native#text/xml
src/emu/layout/ex800.lay svneol=native#text/xml
src/emu/layout/horizont.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.lay svneol=native#text/xml
src/emu/layout/lcd_rot.lay svneol=native#text/xml src/emu/layout/lcd_rot.lay svneol=native#text/xml
@ -7923,7 +7926,6 @@ src/mess/drivers/et3400.c svneol=native#text/plain
src/mess/drivers/eti660.c svneol=native#text/plain src/mess/drivers/eti660.c svneol=native#text/plain
src/mess/drivers/europc.c svneol=native#text/plain src/mess/drivers/europc.c svneol=native#text/plain
src/mess/drivers/evmbug.c svneol=native#text/plain src/mess/drivers/evmbug.c svneol=native#text/plain
src/mess/drivers/ex800.c svneol=native#text/plain
src/mess/drivers/exelv.c svneol=native#text/plain src/mess/drivers/exelv.c svneol=native#text/plain
src/mess/drivers/exp85.c svneol=native#text/plain src/mess/drivers/exp85.c svneol=native#text/plain
src/mess/drivers/fanucs15.c svneol=native#text/plain src/mess/drivers/fanucs15.c svneol=native#text/plain
@ -8598,7 +8600,6 @@ src/mess/layout/elf2.lay svneol=native#text/xml
src/mess/layout/esq1by22.lay svneol=native#text/xml src/mess/layout/esq1by22.lay svneol=native#text/xml
src/mess/layout/esq2by40.lay svneol=native#text/xml src/mess/layout/esq2by40.lay svneol=native#text/xml
src/mess/layout/et3400.lay svneol=native#text/xml src/mess/layout/et3400.lay svneol=native#text/xml
src/mess/layout/ex800.lay svneol=native#text/xml
src/mess/layout/fidelz80.lay svneol=native#text/xml src/mess/layout/fidelz80.lay svneol=native#text/xml
src/mess/layout/gl3000s.lay svneol=native#text/xml src/mess/layout/gl3000s.lay svneol=native#text/xml
src/mess/layout/glasgow.lay svneol=native#text/xml src/mess/layout/glasgow.lay svneol=native#text/xml

View File

@ -738,8 +738,10 @@ BUSOBJS += $(BUSOBJ)/centronics/ctronics.o
BUSOBJS += $(BUSOBJ)/centronics/comxpl80.o BUSOBJS += $(BUSOBJ)/centronics/comxpl80.o
BUSOBJS += $(BUSOBJ)/centronics/covox.o BUSOBJS += $(BUSOBJ)/centronics/covox.o
BUSOBJS += $(BUSOBJ)/centronics/dsjoy.o BUSOBJS += $(BUSOBJ)/centronics/dsjoy.o
BUSOBJS += $(BUSOBJ)/centronics/epson_ex800.o
BUSOBJS += $(BUSOBJ)/centronics/epson_lx800.o BUSOBJS += $(BUSOBJ)/centronics/epson_lx800.o
BUSOBJS += $(BUSOBJ)/centronics/printer.o BUSOBJS += $(BUSOBJ)/centronics/printer.o
$(BUSOBJ)/centronics/epson_ex800.o: $(EMUOBJ)/layout/ex800.lh
$(BUSOBJ)/centronics/epson_lx800.o: $(EMUOBJ)/layout/lx800.lh $(BUSOBJ)/centronics/epson_lx800.o: $(EMUOBJ)/layout/lx800.lh
endif endif

View File

@ -117,11 +117,13 @@ device_centronics_peripheral_interface::~device_centronics_peripheral_interface(
#include "comxpl80.h" #include "comxpl80.h"
#include "epson_ex800.h"
#include "epson_lx800.h" #include "epson_lx800.h"
#include "printer.h" #include "printer.h"
SLOT_INTERFACE_START(centronics_printers) SLOT_INTERFACE_START(centronics_printers)
SLOT_INTERFACE("pl80", COMX_PL80) SLOT_INTERFACE("pl80", COMX_PL80)
SLOT_INTERFACE("ex800", EPSON_EX800)
SLOT_INTERFACE("lx800", EPSON_LX800) SLOT_INTERFACE("lx800", EPSON_LX800)
SLOT_INTERFACE("lx810l", EPSON_LX810L) SLOT_INTERFACE("lx810l", EPSON_LX810L)
SLOT_INTERFACE("ap2000", EPSON_AP2000) SLOT_INTERFACE("ap2000", EPSON_AP2000)

View File

@ -1,3 +1,5 @@
// license:MAME, GPL-2.0+
// copyright-holders:Dirk Best
/****************************************************************************** /******************************************************************************
Epson EX-800 Dot Matrix printer Epson EX-800 Dot Matrix printer
@ -128,42 +130,14 @@ TODO: - The UPD7810 core is missing analog port emulation
******************************************************************************/ ******************************************************************************/
#include "emu.h" #include "epson_ex800.h"
#include "cpu/upd7810/upd7810.h"
#include "sound/beep.h"
#include "ex800.lh" #include "ex800.lh"
class ex800_state : public driver_device
{
public:
ex800_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag) ,
m_maincpu(*this, "maincpu"),
m_beeper(*this, "beeper") { }
int m_irq_state;
DECLARE_READ8_MEMBER(ex800_porta_r);
DECLARE_READ8_MEMBER(ex800_portb_r);
DECLARE_READ8_MEMBER(ex800_portc_r);
DECLARE_WRITE8_MEMBER(ex800_porta_w);
DECLARE_WRITE8_MEMBER(ex800_portb_w);
DECLARE_WRITE8_MEMBER(ex800_portc_w);
DECLARE_READ8_MEMBER(ex800_devsel_r);
DECLARE_WRITE8_MEMBER(ex800_devsel_w);
DECLARE_READ8_MEMBER(ex800_gate5a_r);
DECLARE_WRITE8_MEMBER(ex800_gate5a_w);
DECLARE_READ8_MEMBER(ex800_iosel_r);
DECLARE_WRITE8_MEMBER(ex800_iosel_w);
DECLARE_READ8_MEMBER(ex800_gate7a_r);
DECLARE_WRITE8_MEMBER(ex800_gate7a_w);
virtual void machine_start();
DECLARE_INPUT_CHANGED_MEMBER(online_switch);
required_device<cpu_device> m_maincpu;
required_device<beep_device> m_beeper;
};
//**************************************************************************
// MACROS / CONSTANTS
//**************************************************************************
#define PA0 (data & 0x01) #define PA0 (data & 0x01)
#define PA1 (data & 0x02) #define PA1 (data & 0x02)
@ -193,13 +167,95 @@ public:
#define PC7 (data & 0x80) #define PC7 (data & 0x80)
/******************************************************************************
Misc (will be moved to other files) //**************************************************************************
******************************************************************************/ // DEVICE DEFINITIONS
//**************************************************************************
const device_type EPSON_EX800 = &device_creator<epson_ex800_t>;
//-------------------------------------------------
// ROM( ex800 )
//-------------------------------------------------
ROM_START( ex800 )
ROM_REGION(0x8000, "maincpu", 0)
ROM_LOAD("w8_pe9.9b", 0x0000, 0x8000, CRC(6dd41e9b) SHA1(8e30ead727b9317154742efd881206e9f9bbf95b))
ROM_END
//-------------------------------------------------
// rom_region - device-specific ROM region
//-------------------------------------------------
const rom_entry *epson_ex800_t::device_rom_region() const
{
return ROM_NAME( ex800 );
}
//-------------------------------------------------
// ADDRESS_MAP( ex800_mem )
//-------------------------------------------------
static ADDRESS_MAP_START( ex800_mem, AS_PROGRAM, 8, epson_ex800_t )
AM_RANGE(0x0000, 0x7fff) AM_ROM AM_REGION("maincpu", 0)
AM_RANGE(0x8000, 0xbfff) AM_RAM /* external RAM */
AM_RANGE(0xc000, 0xc7ff) AM_MIRROR(0x1800) AM_READWRITE(devsel_r, devsel_w)
AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(gate5a_r, gate5a_w)
AM_RANGE(0xe800, 0xefff) AM_READWRITE(iosel_r, iosel_w)
AM_RANGE(0xf000, 0xf001) AM_MIRROR(0x07fc) AM_READ(gate7a_r)
AM_RANGE(0xf002, 0xf003) AM_MIRROR(0x07fc) AM_WRITE(gate7a_w)
AM_RANGE(0xf800, 0xfeff) AM_NOP /* not connected */
AM_RANGE(0xff00, 0xffff) AM_RAM /* internal CPU RAM */
ADDRESS_MAP_END
//-------------------------------------------------
// ADDRESS_MAP( ex800_io )
//-------------------------------------------------
static ADDRESS_MAP_START( ex800_io, AS_IO, 8, epson_ex800_t )
AM_RANGE(UPD7810_PORTA, UPD7810_PORTA) AM_READ(porta_r) AM_WRITE(porta_w)
AM_RANGE(UPD7810_PORTB, UPD7810_PORTB) AM_READ(portb_r) AM_WRITE(portb_w)
AM_RANGE(UPD7810_PORTC, UPD7810_PORTC) AM_READ(portc_r) AM_WRITE(portc_w)
ADDRESS_MAP_END
//-------------------------------------------------
// MACHINE_DRIVER( epson_ex800 )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( epson_ex800 )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", UPD7810, 12000000) /* 12 MHz? */
MCFG_CPU_PROGRAM_MAP(ex800_mem)
MCFG_CPU_IO_MAP(ex800_io)
MCFG_DEFAULT_LAYOUT(layout_ex800)
/* audio hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("beeper", BEEP, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
machine_config_constructor epson_ex800_t::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( epson_ex800 );
}
/* The ON LINE switch is directly connected to the INT1 input of the CPU */ /* The ON LINE switch is directly connected to the INT1 input of the CPU */
INPUT_CHANGED_MEMBER(ex800_state::online_switch) INPUT_CHANGED_MEMBER(epson_ex800_t::online_switch)
{ {
if (newval) if (newval)
{ {
@ -209,158 +265,14 @@ INPUT_CHANGED_MEMBER(ex800_state::online_switch)
} }
void ex800_state::machine_start() //-------------------------------------------------
{ // INPUT_PORTS( epson_ex800 )
m_irq_state = ASSERT_LINE; //-------------------------------------------------
/* Setup beep */
m_beeper->set_state(0);
m_beeper->set_frequency(4000); /* measured at 4000 Hz */
}
INPUT_PORTS_START( epson_ex800 )
READ8_MEMBER(ex800_state::ex800_porta_r)
{
logerror("PA R @%x\n", space.device().safe_pc());
return machine().rand();
}
READ8_MEMBER(ex800_state::ex800_portb_r)
{
logerror("PB R @%x\n", space.device().safe_pc());
return machine().rand();
}
READ8_MEMBER(ex800_state::ex800_portc_r)
{
logerror("PC R @%x\n", space.device().safe_pc());
return machine().rand();
}
WRITE8_MEMBER(ex800_state::ex800_porta_w)
{
if (PA6) logerror("BNK0 selected.\n");
if (PA7) logerror("BNK1 selected.\n");
logerror("PA W %x @%x\n", data, space.device().safe_pc());
}
WRITE8_MEMBER(ex800_state::ex800_portb_w)
{
if (data & 3)
logerror("PB0/1 Line feed @%x\n", space.device().safe_pc());
if (!(data & 4))
logerror("PB2 Line feed @%x\n", space.device().safe_pc());
if (data & 8)
logerror("PB3 Online LED on @%x\n", space.device().safe_pc());
else
logerror("PB3 Online LED off @%x\n", space.device().safe_pc());
if (data & 16)
logerror("PB4 Serial @%x\n", space.device().safe_pc());
if (data & 32)
logerror("PB4 Serial @%x\n", space.device().safe_pc());
if (data & 64)
logerror("PB4 Serial @%x\n", space.device().safe_pc());
if (data & 128)
logerror("PB3 Paper empty LED on @%x\n", space.device().safe_pc());
else
logerror("PB3 Paper empty LED off @%x\n", space.device().safe_pc());
// logerror("PB W %x @%x\n", data, space.device().safe_pc());
}
WRITE8_MEMBER(ex800_state::ex800_portc_w)
{
if (data & 0x80)
m_beeper->set_state(0);
else
m_beeper->set_state(1);
logerror("PC W %x @%x\n", data, space.device().safe_pc());
}
/* Memory mapped I/O access */
READ8_MEMBER(ex800_state::ex800_devsel_r)
{
logerror("DEVSEL R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(ex800_state::ex800_devsel_w)
{
logerror("DEVSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}
READ8_MEMBER(ex800_state::ex800_gate5a_r)
{
logerror("GATE5A R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(ex800_state::ex800_gate5a_w)
{
logerror("GATE5A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}
READ8_MEMBER(ex800_state::ex800_iosel_r)
{
logerror("IOSEL R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(ex800_state::ex800_iosel_w)
{
logerror("IOSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}
READ8_MEMBER(ex800_state::ex800_gate7a_r)
{
logerror("GATE7A R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(ex800_state::ex800_gate7a_w)
{
logerror("GATE7A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}
/******************************************************************************
Address Maps
******************************************************************************/
static ADDRESS_MAP_START( ex800_mem, AS_PROGRAM, 8, ex800_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM AM_REGION("maincpu", 0)
AM_RANGE(0x8000, 0xbfff) AM_RAM /* external RAM */
AM_RANGE(0xc000, 0xc7ff) AM_MIRROR(0x1800) AM_READWRITE(ex800_devsel_r, ex800_devsel_w)
AM_RANGE(0xe000, 0xe7ff) AM_READWRITE(ex800_gate5a_r, ex800_gate5a_w)
AM_RANGE(0xe800, 0xefff) AM_READWRITE(ex800_iosel_r, ex800_iosel_w)
AM_RANGE(0xf000, 0xf001) AM_MIRROR(0x07fc) AM_READ(ex800_gate7a_r)
AM_RANGE(0xf002, 0xf003) AM_MIRROR(0x07fc) AM_WRITE(ex800_gate7a_w)
AM_RANGE(0xf800, 0xfeff) AM_NOP /* not connected */
AM_RANGE(0xff00, 0xffff) AM_RAM /* internal CPU RAM */
ADDRESS_MAP_END
static ADDRESS_MAP_START( ex800_io, AS_IO, 8, ex800_state )
AM_RANGE(UPD7810_PORTA, UPD7810_PORTA) AM_READ(ex800_porta_r) AM_WRITE(ex800_porta_w)
AM_RANGE(UPD7810_PORTB, UPD7810_PORTB) AM_READ(ex800_portb_r) AM_WRITE(ex800_portb_w)
AM_RANGE(UPD7810_PORTC, UPD7810_PORTC) AM_READ(ex800_portc_r) AM_WRITE(ex800_portc_w)
ADDRESS_MAP_END
/******************************************************************************
Inputs and DIP switches
******************************************************************************/
static INPUT_PORTS_START( ex800 )
PORT_START("ONLISW") PORT_START("ONLISW")
PORT_BIT(0xfe, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0xfe, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ON LINE") PORT_CODE(KEYCODE_F9) PORT_CHANGED_MEMBER(DEVICE_SELF, ex800_state, online_switch, NULL) PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("ON LINE") PORT_CODE(KEYCODE_F9) PORT_CHANGED_MEMBER(DEVICE_SELF, epson_ex800_t, online_switch, NULL)
PORT_START("FEED") PORT_START("FEED")
PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_UNUSED)
@ -429,45 +341,159 @@ static INPUT_PORTS_START( ex800 )
INPUT_PORTS_END INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
/****************************************************************************** ioport_constructor epson_ex800_t::device_input_ports() const
Machine Drivers {
******************************************************************************/ return INPUT_PORTS_NAME( epson_ex800 );
}
static MACHINE_CONFIG_START( ex800, ex800_state )
/* basic machine hardware */
MCFG_CPU_ADD("maincpu", UPD7810, 12000000) /* 12 MHz? */
MCFG_CPU_PROGRAM_MAP(ex800_mem)
MCFG_CPU_IO_MAP(ex800_io)
MCFG_DEFAULT_LAYOUT(layout_ex800)
/* audio hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("beeper", BEEP, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
/****************************************************************************** //**************************************************************************
ROM Definitions // LIVE DEVICE
******************************************************************************/ //**************************************************************************
//-------------------------------------------------
// epson_ex800_t - constructor
//-------------------------------------------------
epson_ex800_t::epson_ex800_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, EPSON_EX800, "Epson EX-800", tag, owner, clock, "ex800", __FILE__),
device_centronics_peripheral_interface(mconfig, *this),
m_maincpu(*this, "maincpu"),
m_beeper(*this, "beeper")
{
}
ROM_START( ex800 ) //-------------------------------------------------
ROM_REGION(0x8000, "maincpu", 0) // device_start - device-specific startup
ROM_LOAD("w8_pe9.9b", 0x0000, 0x8000, CRC(6dd41e9b) SHA1(8e30ead727b9317154742efd881206e9f9bbf95b)) //-------------------------------------------------
ROM_END
void epson_ex800_t::device_start()
{
m_irq_state = ASSERT_LINE;
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
/****************************************************************************** void epson_ex800_t::device_reset()
Drivers {
******************************************************************************/ /* Setup beep */
m_beeper->set_state(0);
m_beeper->set_frequency(4000); /* measured at 4000 Hz */
}
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ READ8_MEMBER(epson_ex800_t::porta_r)
COMP( 1986, ex800, 0, 0, ex800, ex800, driver_device, 0, "Epson", "EX-800", GAME_NO_SOUND | GAME_NOT_WORKING) {
logerror("PA R @%x\n", space.device().safe_pc());
return machine().rand();
}
READ8_MEMBER(epson_ex800_t::portb_r)
{
logerror("PB R @%x\n", space.device().safe_pc());
return machine().rand();
}
READ8_MEMBER(epson_ex800_t::portc_r)
{
logerror("PC R @%x\n", space.device().safe_pc());
return machine().rand();
}
WRITE8_MEMBER(epson_ex800_t::porta_w)
{
if (PA6) logerror("BNK0 selected.\n");
if (PA7) logerror("BNK1 selected.\n");
logerror("PA W %x @%x\n", data, space.device().safe_pc());
}
WRITE8_MEMBER(epson_ex800_t::portb_w)
{
if (data & 3)
logerror("PB0/1 Line feed @%x\n", space.device().safe_pc());
if (!(data & 4))
logerror("PB2 Line feed @%x\n", space.device().safe_pc());
if (data & 8)
logerror("PB3 Online LED on @%x\n", space.device().safe_pc());
else
logerror("PB3 Online LED off @%x\n", space.device().safe_pc());
if (data & 16)
logerror("PB4 Serial @%x\n", space.device().safe_pc());
if (data & 32)
logerror("PB4 Serial @%x\n", space.device().safe_pc());
if (data & 64)
logerror("PB4 Serial @%x\n", space.device().safe_pc());
if (data & 128)
logerror("PB3 Paper empty LED on @%x\n", space.device().safe_pc());
else
logerror("PB3 Paper empty LED off @%x\n", space.device().safe_pc());
// logerror("PB W %x @%x\n", data, space.device().safe_pc());
}
WRITE8_MEMBER(epson_ex800_t::portc_w)
{
if (data & 0x80)
m_beeper->set_state(0);
else
m_beeper->set_state(1);
logerror("PC W %x @%x\n", data, space.device().safe_pc());
}
/* Memory mapped I/O access */
READ8_MEMBER(epson_ex800_t::devsel_r)
{
logerror("DEVSEL R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(epson_ex800_t::devsel_w)
{
logerror("DEVSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}
READ8_MEMBER(epson_ex800_t::gate5a_r)
{
logerror("GATE5A R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(epson_ex800_t::gate5a_w)
{
logerror("GATE5A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}
READ8_MEMBER(epson_ex800_t::iosel_r)
{
logerror("IOSEL R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(epson_ex800_t::iosel_w)
{
logerror("IOSEL W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}
READ8_MEMBER(epson_ex800_t::gate7a_r)
{
logerror("GATE7A R @%x with offset %x\n", space.device().safe_pc(), offset);
return machine().rand();
}
WRITE8_MEMBER(epson_ex800_t::gate7a_w)
{
logerror("GATE7A W %x @%x with offset %x\n", data, space.device().safe_pc(), offset);
}

View File

@ -0,0 +1,79 @@
// license:MAME, GPL-2.0+
// copyright-holders:Dirk Best
/**********************************************************************
Epson EX-800 dot matrix printer emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
**********************************************************************/
#pragma once
#ifndef __EPSON_EX800__
#define __EPSON_EX800__
#include "emu.h"
#include "ctronics.h"
#include "cpu/upd7810/upd7810.h"
#include "sound/beep.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> epson_ex800_t
class epson_ex800_t : public device_t,
public device_centronics_peripheral_interface
{
public:
// construction/destruction
epson_ex800_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
epson_ex800_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_READ8_MEMBER(portb_r);
DECLARE_READ8_MEMBER(portc_r);
DECLARE_WRITE8_MEMBER(porta_w);
DECLARE_WRITE8_MEMBER(portb_w);
DECLARE_WRITE8_MEMBER(portc_w);
DECLARE_READ8_MEMBER(devsel_r);
DECLARE_WRITE8_MEMBER(devsel_w);
DECLARE_READ8_MEMBER(gate5a_r);
DECLARE_WRITE8_MEMBER(gate5a_w);
DECLARE_READ8_MEMBER(iosel_r);
DECLARE_WRITE8_MEMBER(iosel_w);
DECLARE_READ8_MEMBER(gate7a_r);
DECLARE_WRITE8_MEMBER(gate7a_w);
DECLARE_INPUT_CHANGED_MEMBER(online_switch);
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
private:
required_device<cpu_device> m_maincpu;
required_device<beep_device> m_beeper;
int m_irq_state;
};
// device type definition
extern const device_type EPSON_EX800;
#endif

View File

@ -285,6 +285,15 @@ epson_ap2000_t::epson_ap2000_t(const machine_config &mconfig, const char *tag, d
//------------------------------------------------- //-------------------------------------------------
void epson_lx800_t::device_start() void epson_lx800_t::device_start()
{
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void epson_lx800_t::device_reset()
{ {
m_beep->set_state(0); m_beep->set_state(0);
m_beep->set_frequency(4000); /* ? */ m_beep->set_frequency(4000); /* ? */

View File

@ -59,6 +59,7 @@ public:
protected: protected:
// device-level overrides // device-level overrides
virtual void device_start(); virtual void device_start();
virtual void device_reset();
private: private:
required_device<cpu_device> m_maincpu; required_device<cpu_device> m_maincpu;

View File

@ -1985,7 +1985,6 @@ fanucs15 // 1990
//********** Misc ********************************************************** //********** Misc **********************************************************
ex800 // Epson EX-800 printer
ssem // Manchester Small-Scale Experimental Machine, "Baby" ssem // Manchester Small-Scale Experimental Machine, "Baby"
craft // Craft, by [lft] craft // Craft, by [lft]

View File

@ -1266,7 +1266,6 @@ $(MESSOBJ)/epoch.a: \
$(MESS_AUDIO)/upd1771.o \ $(MESS_AUDIO)/upd1771.o \
$(MESSOBJ)/epson.a: \ $(MESSOBJ)/epson.a: \
$(MESS_DRIVERS)/ex800.o \
$(MESS_DRIVERS)/hx20.o \ $(MESS_DRIVERS)/hx20.o \
$(MESS_MACHINE)/e05a03.o \ $(MESS_MACHINE)/e05a03.o \
$(MESS_DRIVERS)/px4.o \ $(MESS_DRIVERS)/px4.o \
@ -2271,7 +2270,6 @@ $(MESS_DRIVERS)/elekscmp.o: $(MESS_LAYOUT)/elekscmp.lh
$(MESS_MACHINE)/esqvfd.o: $(MESS_LAYOUT)/esq2by40.lh \ $(MESS_MACHINE)/esqvfd.o: $(MESS_LAYOUT)/esq2by40.lh \
$(MESS_LAYOUT)/esq1by22.lh $(MESS_LAYOUT)/esq1by22.lh
$(MESS_DRIVERS)/et3400.o: $(MESS_LAYOUT)/et3400.lh $(MESS_DRIVERS)/et3400.o: $(MESS_LAYOUT)/et3400.lh
$(MESS_DRIVERS)/ex800.o: $(MESS_LAYOUT)/ex800.lh
$(MESS_DRIVERS)/fidelz80.o: $(MESS_LAYOUT)/fidelz80.lh \ $(MESS_DRIVERS)/fidelz80.o: $(MESS_LAYOUT)/fidelz80.lh \
$(MESS_LAYOUT)/bridgec3.lh \ $(MESS_LAYOUT)/bridgec3.lh \
$(MESS_LAYOUT)/vsc.lh $(MESS_LAYOUT)/vsc.lh