mirror of
https://github.com/holub/mame
synced 2025-06-03 03:16:30 +03:00
nec_p72: add skeleton driver for NEC PinWriter P72 dot-matrix printer
This commit is contained in:
parent
ad13f11ea2
commit
e5ae5d0b09
@ -1494,6 +1494,8 @@ if (BUSES["CENTRONICS"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/centronics/epson_lx800.h",
|
||||
MAME_DIR .. "src/devices/bus/centronics/epson_lx810l.c",
|
||||
MAME_DIR .. "src/devices/bus/centronics/epson_lx810l.h",
|
||||
MAME_DIR .. "src/devices/bus/centronics/nec_p72.c",
|
||||
MAME_DIR .. "src/devices/bus/centronics/nec_p72.h",
|
||||
MAME_DIR .. "src/devices/bus/centronics/printer.c",
|
||||
MAME_DIR .. "src/devices/bus/centronics/printer.h",
|
||||
MAME_DIR .. "src/devices/bus/centronics/digiblst.c",
|
||||
|
@ -117,6 +117,7 @@ device_centronics_peripheral_interface::~device_centronics_peripheral_interface(
|
||||
#include "epson_ex800.h"
|
||||
#include "epson_lx800.h"
|
||||
#include "epson_lx810l.h"
|
||||
#include "nec_p72.h"
|
||||
#include "printer.h"
|
||||
#include "covox.h"
|
||||
|
||||
@ -126,6 +127,7 @@ SLOT_INTERFACE_START(centronics_devices)
|
||||
SLOT_INTERFACE("lx800", EPSON_LX800)
|
||||
SLOT_INTERFACE("lx810l", EPSON_LX810L)
|
||||
SLOT_INTERFACE("ap2000", EPSON_AP2000)
|
||||
SLOT_INTERFACE("p72", NEC_P72)
|
||||
SLOT_INTERFACE("printer", CENTRONICS_PRINTER)
|
||||
SLOT_INTERFACE("covox", CENTRONICS_COVOX)
|
||||
SLOT_INTERFACE("covox_stereo", CENTRONICS_COVOX_STEREO)
|
||||
|
94
src/devices/bus/centronics/nec_p72.c
Normal file
94
src/devices/bus/centronics/nec_p72.c
Normal file
@ -0,0 +1,94 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ramiro Polla
|
||||
|
||||
#include "nec_p72.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type NEC_P72 = &device_creator<nec_p72_t>;
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROM( p72 )
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( p72 )
|
||||
ROM_REGION(0x100000, "maincpu", 0)
|
||||
ROM_LOAD("p72.2c", 0x000000, 0x100000, CRC(2bc6846f) SHA1(10430f1d3b73ad413d77053515d9d53831a1341b))
|
||||
ROM_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const rom_entry *nec_p72_t::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( p72 );
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// ADDRESS_MAP( p72_mem )
|
||||
//-------------------------------------------------
|
||||
|
||||
static ADDRESS_MAP_START( p72_mem, AS_PROGRAM, 8, nec_p72_t )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM /* 1Mbit firmware */
|
||||
AM_RANGE(0x100000, 0x1fffff) AM_RAM /* 1Mbit external RAM */ /* TODO might be 2x1Mbit */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_DRIVER( nec_p72 )
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( nec_p72 )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", V33, XTAL_16MHz/2) /* TODO it's actually a V40 */
|
||||
MCFG_CPU_PROGRAM_MAP(p72_mem)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor nec_p72_t::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( nec_p72 );
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void nec_p72_t::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// nec_p72_t - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
nec_p72_t::nec_p72_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, NEC_P72, "NEC PinWrite P72", tag, owner, clock, "p72", __FILE__),
|
||||
device_centronics_peripheral_interface(mconfig, *this),
|
||||
m_maincpu(*this, "maincpu")
|
||||
{
|
||||
}
|
||||
|
||||
nec_p72_t::nec_p72_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")
|
||||
{
|
||||
}
|
45
src/devices/bus/centronics/nec_p72.h
Normal file
45
src/devices/bus/centronics/nec_p72.h
Normal file
@ -0,0 +1,45 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Ramiro Polla
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __NEC_P72__
|
||||
#define __NEC_P72__
|
||||
|
||||
#include "emu.h"
|
||||
#include "ctronics.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> nec_p72_t
|
||||
|
||||
class nec_p72_t : public device_t,
|
||||
public device_centronics_peripheral_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
nec_p72_t(const machine_config &mconfig, const char *tag,
|
||||
device_t *owner, UINT32 clock);
|
||||
nec_p72_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;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
|
||||
private:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type NEC_P72;
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user