mirror of
https://github.com/holub/mame
synced 2025-06-04 03:46:29 +03:00
bus/spectrum: add common printer interfaces: ZX Lprint, ZX Lprint III, Kempston Centronics E Interface ('flat' and 'upright' models)
This commit is contained in:
parent
d0159e9f7b
commit
cd02b2f1fd
@ -3778,6 +3778,8 @@ if (BUSES["SPECTRUM"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/spectrum/kempdisc.h",
|
||||
MAME_DIR .. "src/devices/bus/spectrum/logitek.cpp",
|
||||
MAME_DIR .. "src/devices/bus/spectrum/logitek.h",
|
||||
MAME_DIR .. "src/devices/bus/spectrum/lprint.cpp",
|
||||
MAME_DIR .. "src/devices/bus/spectrum/lprint.h",
|
||||
MAME_DIR .. "src/devices/bus/spectrum/melodik.cpp",
|
||||
MAME_DIR .. "src/devices/bus/spectrum/melodik.h",
|
||||
MAME_DIR .. "src/devices/bus/spectrum/mface.cpp",
|
||||
|
@ -163,13 +163,14 @@ void spectrum_expansion_slot_device::mreq_w(offs_t offset, uint8_t data)
|
||||
#include "fuller.h"
|
||||
#include "kempjoy.h"
|
||||
#include "kempdisc.h"
|
||||
#include "logitek.h"
|
||||
#include "lprint.h"
|
||||
#include "melodik.h"
|
||||
#include "mface.h"
|
||||
#include "mgt.h"
|
||||
#include "mikroplus.h"
|
||||
#include "opus.h"
|
||||
#include "plus2test.h"
|
||||
#include "logitek.h"
|
||||
#include "protek.h"
|
||||
#include "sdi.h"
|
||||
#include "sixword.h"
|
||||
@ -199,6 +200,10 @@ void spectrum_expansion_devices(device_slot_interface &device)
|
||||
device.option_add("fuller", SPECTRUM_FULLER);
|
||||
device.option_add("kempjoy", SPECTRUM_KEMPJOY);
|
||||
device.option_add("kempdisc", SPECTRUM_KEMPDISC);
|
||||
device.option_add("kempcentref", SPECTRUM_KEMPCENTREF);
|
||||
device.option_add("kempcentreu", SPECTRUM_KEMPCENTREU);
|
||||
device.option_add("lprint", SPECTRUM_LPRINT);
|
||||
device.option_add("lprint3", SPECTRUM_LPRINT3);
|
||||
device.option_add("melodik", SPECTRUM_MELODIK);
|
||||
device.option_add("mface1", SPECTRUM_MFACE1);
|
||||
device.option_add("mface128", SPECTRUM_MFACE128);
|
||||
|
454
src/devices/bus/spectrum/lprint.cpp
Normal file
454
src/devices/bus/spectrum/lprint.cpp
Normal file
@ -0,0 +1,454 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:MetalliC
|
||||
/*********************************************************************
|
||||
|
||||
Common printer interfaces
|
||||
|
||||
ZX Lprint
|
||||
(c) 1983 Euroelectronics (UK)
|
||||
|
||||
ZX Lprint III
|
||||
(c) 1984 Euroelectronics (UK)
|
||||
Centronics and RS232 interface, most common printer interface for ZX-Spectrum.
|
||||
|
||||
(TODO) Kempston Centronics S Interface
|
||||
(c) 1983 Kempston Micro Electronics Ltd (UK)
|
||||
ROM-less device, require printer driver to be loaded from tape.
|
||||
|
||||
Kempston Centronics E Interface
|
||||
(c) 1984 Kempston Micro Electronics Ltd (UK)
|
||||
|
||||
Notes/TODOs:
|
||||
- add information and docs
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "lprint.h"
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
DEFINE_DEVICE_TYPE(SPECTRUM_LPRINT, spectrum_lprint_device, "spectrum_lprint", "ZX Lprint")
|
||||
DEFINE_DEVICE_TYPE(SPECTRUM_LPRINT3, spectrum_lprint3_device, "spectrum_lprint3", "ZX Lprint III")
|
||||
DEFINE_DEVICE_TYPE(SPECTRUM_KEMPCENTREF, spectrum_kempcentre_device, "spectrum_kempcentref", "Kempston Centronics E (flat)")
|
||||
DEFINE_DEVICE_TYPE(SPECTRUM_KEMPCENTREU, spectrum_kempcentreu_device, "spectrum_kempcentreu", "Kempston Centronics E (upright)")
|
||||
|
||||
//-------------------------------------------------
|
||||
// ROMs
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START(lprint)
|
||||
ROM_REGION(0x800, "rom", 0)
|
||||
ROM_LOAD("lprint.rom", 0x0000, 0x0800, CRC(3c3483e5) SHA1(3e4c7ecd8c3eb011cdf75eb23faf8d8ea8329757)) // permanently overlay 0x0800-0x0fff ROM area
|
||||
ROM_END
|
||||
|
||||
ROM_START(lprint3)
|
||||
ROM_REGION(0x800, "rom", 0)
|
||||
ROM_DEFAULT_BIOS("v2")
|
||||
|
||||
// original
|
||||
ROM_SYSTEM_BIOS(0, "v1", "v1.0")
|
||||
ROMX_LOAD("v10.rom", 0x0000, 0x0800, CRC(a5014f40) SHA1(fe823a8b87a8bdacb14aac848bc7fe946f76faae), ROM_BIOS(0))
|
||||
ROM_SYSTEM_BIOS(1, "v2", "v2.0")
|
||||
ROMX_LOAD("v20.rom", 0x0000, 0x0800, CRC(b8f9a58d) SHA1(4966664badbed44ddb1c1a2ca01bdef60f0a30f8), ROM_BIOS(1))
|
||||
|
||||
// clones
|
||||
ROM_SYSTEM_BIOS(2, "kp", "Sandy") // from Sandy Disco V3 (Kempston Disc clone) lower PCB, also have joystick port and passthru connector
|
||||
ROMX_LOAD("sandy.rom", 0x0000, 0x0800, CRC(77e752f2) SHA1(11f44c5e743a413e8bc0d07c4249f36d2c0a172a), ROM_BIOS(2))
|
||||
ROM_SYSTEM_BIOS(3, "rus", "Art East Computers (RU)") // added support for popular Soviet and Eastern Block made printers
|
||||
ROMX_LOAD("himak.rom", 0x0000, 0x0800, CRC(b1f15976) SHA1(d9c0297c05e8092fb7e0198f4172d3d4e6ed252c), ROM_BIOS(3))
|
||||
ROM_END
|
||||
|
||||
ROM_START(kempcentref)
|
||||
ROM_REGION(0x800, "rom", 0)
|
||||
ROM_LOAD("kemp-e.rom", 0x0000, 0x0800, CRC(a58b1e97) SHA1(b26e9f720a215019b8710a4a094d6fde6ecae5fd))
|
||||
ROM_END
|
||||
|
||||
ROM_START(kempcentreu)
|
||||
ROM_REGION(0x800, "rom", 0)
|
||||
ROM_LOAD("7f.rom", 0x0000, 0x0800, CRC(b67a416d) SHA1(6d0772e81cfd9bc994b1c91d4e01b45e0fc0d3d3)) // scrambled
|
||||
ROM_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_add_mconfig - add device configuration
|
||||
//-------------------------------------------------
|
||||
|
||||
void spectrum_lprint_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
CENTRONICS(config, m_centronics, centronics_devices, "printer");
|
||||
m_centronics->busy_handler().set(FUNC(spectrum_lprint_device::busy_w));
|
||||
}
|
||||
|
||||
void spectrum_lprint3_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
CENTRONICS(config, m_centronics, centronics_devices, "printer");
|
||||
m_centronics->busy_handler().set(FUNC(spectrum_lprint3_device::busy_w));
|
||||
|
||||
RS232_PORT(config, m_rs232, default_rs232_devices, nullptr);
|
||||
|
||||
// passthru
|
||||
// this is not really accurate, original ZX-Lprint boards had no passthru connector, but only some of clones
|
||||
// TODO: populate expansion port only for devices which really had it
|
||||
SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, nullptr);
|
||||
m_exp->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w));
|
||||
m_exp->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w));
|
||||
}
|
||||
|
||||
void spectrum_kempcentre_device::device_add_mconfig(machine_config &config)
|
||||
{
|
||||
CENTRONICS(config, m_centronics, centronics_devices, "printer");
|
||||
m_centronics->busy_handler().set(FUNC(spectrum_kempcentre_device::busy_w));
|
||||
}
|
||||
|
||||
const tiny_rom_entry *spectrum_lprint_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(lprint);
|
||||
}
|
||||
|
||||
const tiny_rom_entry *spectrum_lprint3_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(lprint3);
|
||||
}
|
||||
|
||||
const tiny_rom_entry *spectrum_kempcentre_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(kempcentref);
|
||||
}
|
||||
|
||||
const tiny_rom_entry *spectrum_kempcentreu_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME(kempcentreu);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// spectrum_lprint_device - constructors
|
||||
//-------------------------------------------------
|
||||
|
||||
spectrum_lprint_device::spectrum_lprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, SPECTRUM_LPRINT, tag, owner, clock)
|
||||
, device_spectrum_expansion_interface(mconfig, *this)
|
||||
, m_rom(*this, "rom")
|
||||
, m_centronics(*this, "centronics")
|
||||
{
|
||||
}
|
||||
|
||||
spectrum_lprint3_device::spectrum_lprint3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, SPECTRUM_LPRINT3, tag, owner, clock)
|
||||
, device_spectrum_expansion_interface(mconfig, *this)
|
||||
, m_rom(*this, "rom")
|
||||
, m_centronics(*this, "centronics")
|
||||
, m_rs232(*this, "rs232")
|
||||
, m_exp(*this, "exp")
|
||||
{
|
||||
}
|
||||
|
||||
spectrum_kempcentre_device::spectrum_kempcentre_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, type, tag, owner, clock)
|
||||
, device_spectrum_expansion_interface(mconfig, *this)
|
||||
, m_rom(*this, "rom")
|
||||
, m_centronics(*this, "centronics")
|
||||
{
|
||||
}
|
||||
|
||||
spectrum_kempcentre_device::spectrum_kempcentre_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: spectrum_kempcentre_device(mconfig, SPECTRUM_KEMPCENTREF, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
spectrum_kempcentreu_device::spectrum_kempcentreu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: spectrum_kempcentre_device(mconfig, SPECTRUM_KEMPCENTREU, tag, owner, clock)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void spectrum_lprint_device::device_start()
|
||||
{
|
||||
m_busy = 0;
|
||||
save_item(NAME(m_romcs));
|
||||
save_item(NAME(m_busy));
|
||||
}
|
||||
|
||||
void spectrum_lprint3_device::device_start()
|
||||
{
|
||||
m_busy = 0;
|
||||
save_item(NAME(m_romcs));
|
||||
save_item(NAME(m_busy));
|
||||
}
|
||||
|
||||
void spectrum_kempcentre_device::device_start()
|
||||
{
|
||||
m_busy = 0;
|
||||
save_item(NAME(m_active));
|
||||
save_item(NAME(m_romcs));
|
||||
save_item(NAME(m_busy));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void spectrum_lprint_device::device_reset()
|
||||
{
|
||||
m_romcs = 0;
|
||||
m_centronics->write_strobe(1);
|
||||
}
|
||||
|
||||
void spectrum_lprint3_device::device_reset()
|
||||
{
|
||||
m_romcs = 0;
|
||||
m_centronics->write_strobe(1);
|
||||
}
|
||||
|
||||
void spectrum_kempcentre_device::device_reset()
|
||||
{
|
||||
m_active = 0;
|
||||
m_romcs = 0;
|
||||
m_centronics->write_strobe(1);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION (lprint)
|
||||
//**************************************************************************
|
||||
|
||||
READ_LINE_MEMBER(spectrum_lprint_device::romcs)
|
||||
{
|
||||
return m_romcs;
|
||||
}
|
||||
|
||||
void spectrum_lprint_device::pre_opcode_fetch(offs_t offset)
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_romcs = offset >= 0x0800 && offset < 0x1000;
|
||||
}
|
||||
|
||||
void spectrum_lprint_device::pre_data_fetch(offs_t offset)
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_romcs = offset >= 0x0800 && offset < 0x1000;
|
||||
}
|
||||
|
||||
uint8_t spectrum_lprint_device::mreq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
if (m_romcs)
|
||||
data = m_rom->base()[offset & 0x7ff];
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
uint8_t spectrum_lprint_device::iorq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
if (!BIT(offset, 2))
|
||||
{
|
||||
// code check this like - if (value & 0xe0) == 0x40, bit 6 probably /BUSY
|
||||
data &= ~0xe0;
|
||||
data |= !m_busy << 6;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void spectrum_lprint_device::iorq_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (!BIT(offset, 2))
|
||||
{
|
||||
m_centronics->write_data0(BIT(data, 0));
|
||||
m_centronics->write_data1(BIT(data, 1));
|
||||
m_centronics->write_data2(BIT(data, 2));
|
||||
m_centronics->write_data3(BIT(data, 3));
|
||||
m_centronics->write_data4(BIT(data, 4));
|
||||
m_centronics->write_data5(BIT(data, 5));
|
||||
m_centronics->write_data6(BIT(data, 6));
|
||||
m_centronics->write_data7(BIT(data, 7));
|
||||
m_centronics->write_strobe(1); // strobe probably fired automatically
|
||||
m_centronics->write_strobe(0);
|
||||
m_centronics->write_strobe(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION (lprint3)
|
||||
//**************************************************************************
|
||||
|
||||
READ_LINE_MEMBER(spectrum_lprint3_device::romcs)
|
||||
{
|
||||
return m_romcs | m_exp->romcs();
|
||||
}
|
||||
|
||||
uint8_t spectrum_lprint3_device::iorq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = m_exp->iorq_r(offset);
|
||||
|
||||
if (!BIT(offset, 2))
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_romcs = BIT(offset, 7);
|
||||
data &= ~0xc0;
|
||||
data |= !m_rs232->dsr_r() << 6;
|
||||
data |= m_busy << 7;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void spectrum_lprint3_device::iorq_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if (!BIT(offset, 2))
|
||||
{
|
||||
m_centronics->write_data0(BIT(data, 0));
|
||||
m_centronics->write_data1(BIT(data, 1));
|
||||
m_centronics->write_data2(BIT(data, 2));
|
||||
m_centronics->write_data3(BIT(data, 3));
|
||||
m_centronics->write_data4(BIT(data, 4));
|
||||
m_centronics->write_data5(BIT(data, 5));
|
||||
m_centronics->write_data6(BIT(data, 6));
|
||||
m_centronics->write_data7(BIT(data, 7));
|
||||
m_centronics->write_strobe(BIT(offset, 7));
|
||||
m_rs232->write_txd(!BIT(data, 7));
|
||||
}
|
||||
|
||||
m_exp->iorq_w(offset, data);
|
||||
}
|
||||
|
||||
uint8_t spectrum_lprint3_device::mreq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
if (m_romcs)
|
||||
data = m_rom->base()[offset & 0x7ff];
|
||||
|
||||
if (m_exp->romcs())
|
||||
data &= m_exp->mreq_r(offset);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION (kempcentre)
|
||||
//**************************************************************************
|
||||
|
||||
READ_LINE_MEMBER(spectrum_kempcentre_device::romcs)
|
||||
{
|
||||
return m_romcs;
|
||||
}
|
||||
|
||||
void spectrum_kempcentre_device::pre_opcode_fetch(offs_t offset)
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_romcs = m_active && offset >= 0x0800 && offset < 0x1000;
|
||||
}
|
||||
|
||||
void spectrum_kempcentre_device::pre_data_fetch(offs_t offset)
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_romcs = m_active && offset >= 0x0800 && offset < 0x1000;
|
||||
}
|
||||
|
||||
uint8_t spectrum_kempcentre_device::iorq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
if (!BIT(offset, 2)) // earlier version ? uses same paging as Lprint III
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_active = BIT(offset, 7);
|
||||
}
|
||||
|
||||
if ((offset & 0xf0) == 0xb0) // BB or BF, actual address decode is not known
|
||||
{
|
||||
data &= ~0xc0;
|
||||
data |= m_busy << 6;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void spectrum_kempcentre_device::iorq_w(offs_t offset, uint8_t data)
|
||||
{
|
||||
if ((offset & 0xf0) == 0xb0) // BB or BF, actual address decode is not known
|
||||
{
|
||||
m_centronics->write_data0(BIT(data, 0));
|
||||
m_centronics->write_data1(BIT(data, 1));
|
||||
m_centronics->write_data2(BIT(data, 2));
|
||||
m_centronics->write_data3(BIT(data, 3));
|
||||
m_centronics->write_data4(BIT(data, 4));
|
||||
m_centronics->write_data5(BIT(data, 5));
|
||||
m_centronics->write_data6(BIT(data, 6));
|
||||
m_centronics->write_data7(BIT(data, 7));
|
||||
m_centronics->write_strobe(BIT(offset, 2));
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t spectrum_kempcentre_device::mreq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
if (m_romcs)
|
||||
data = m_rom->base()[offset & 0x7ff];
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION (kempcentreu)
|
||||
//**************************************************************************
|
||||
|
||||
void spectrum_kempcentreu_device::device_start()
|
||||
{
|
||||
// descramble ROM
|
||||
std::vector<uint8_t> temp(m_rom->bytes());
|
||||
std::copy_n(m_rom->base(), m_rom->bytes(), &temp[0]);
|
||||
for (int i = 0; i < m_rom->bytes(); i++)
|
||||
{
|
||||
uint16_t addr = bitswap<11>(i, 10, 1, 0, 3, 7, 2, 6, 5, 4, 8, 9);
|
||||
m_rom->base()[i] = bitswap<8>(temp[addr], 4, 5, 0, 1, 6, 7, 2, 3);
|
||||
}
|
||||
spectrum_kempcentre_device::device_start();
|
||||
}
|
||||
|
||||
void spectrum_kempcentreu_device::pre_opcode_fetch(offs_t offset)
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
{
|
||||
if (offset == 0x09F4 || offset == 0x0eb4) // later version ? paged at PRINT and COPY routines
|
||||
m_active = 1;
|
||||
|
||||
m_romcs = m_active && offset >= 0x0800 && offset < 0x1000;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t spectrum_kempcentreu_device::iorq_r(offs_t offset)
|
||||
{
|
||||
uint8_t data = 0xff;
|
||||
|
||||
if ((offset & 0xf0) == 0xb0) // BB or BF, actual address decode is not known
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
m_active = !BIT(offset, 2);
|
||||
data &= ~0xc0;
|
||||
data |= m_busy << 6;
|
||||
//data |= something_centronics << 7; // wired to centronics port, but connected to GND via wire-mod
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
157
src/devices/bus/spectrum/lprint.h
Normal file
157
src/devices/bus/spectrum/lprint.h
Normal file
@ -0,0 +1,157 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:MetalliC
|
||||
/*********************************************************************
|
||||
|
||||
Common printer interfaces
|
||||
|
||||
*********************************************************************/
|
||||
#ifndef MAME_BUS_SPECTRUM_LPRINT_H
|
||||
#define MAME_BUS_SPECTRUM_LPRINT_H
|
||||
|
||||
#include "exp.h"
|
||||
#include "bus/centronics/ctronics.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class spectrum_lprint_device :
|
||||
public device_t,
|
||||
public device_spectrum_expansion_interface
|
||||
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
spectrum_lprint_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
virtual void pre_opcode_fetch(offs_t offset) override;
|
||||
virtual void pre_data_fetch(offs_t offset) override;
|
||||
virtual uint8_t mreq_r(offs_t offset) override;
|
||||
virtual uint8_t iorq_r(offs_t offset) override;
|
||||
virtual void iorq_w(offs_t offset, uint8_t data) override;
|
||||
virtual DECLARE_READ_LINE_MEMBER(romcs) override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(busy_w) { m_busy = state; };
|
||||
|
||||
required_memory_region m_rom;
|
||||
required_device<centronics_device> m_centronics;
|
||||
|
||||
int m_romcs;
|
||||
int m_busy;
|
||||
};
|
||||
|
||||
class spectrum_lprint3_device :
|
||||
public device_t,
|
||||
public device_spectrum_expansion_interface
|
||||
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
spectrum_lprint3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
virtual uint8_t mreq_r(offs_t offset) override;
|
||||
virtual uint8_t iorq_r(offs_t offset) override;
|
||||
virtual void iorq_w(offs_t offset, uint8_t data) override;
|
||||
virtual DECLARE_READ_LINE_MEMBER(romcs) override;
|
||||
|
||||
// passthru
|
||||
virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); };
|
||||
virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); };
|
||||
virtual void pre_data_fetch(offs_t offset) override { m_exp->pre_data_fetch(offset); };
|
||||
virtual void post_data_fetch(offs_t offset) override { m_exp->post_data_fetch(offset); };
|
||||
virtual void mreq_w(offs_t offset, uint8_t data) override { if (m_exp->romcs()) m_exp->mreq_w(offset, data); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(busy_w) { m_busy = state; };
|
||||
|
||||
required_memory_region m_rom;
|
||||
required_device<centronics_device> m_centronics;
|
||||
required_device<rs232_port_device> m_rs232;
|
||||
required_device<spectrum_expansion_slot_device> m_exp;
|
||||
|
||||
int m_romcs;
|
||||
int m_busy;
|
||||
};
|
||||
|
||||
class spectrum_kempcentre_device :
|
||||
public device_t,
|
||||
public device_spectrum_expansion_interface
|
||||
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
spectrum_kempcentre_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
spectrum_kempcentre_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// optional information overrides
|
||||
virtual void device_add_mconfig(machine_config &config) override;
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
virtual void pre_opcode_fetch(offs_t offset) override;
|
||||
virtual void pre_data_fetch(offs_t offset) override;
|
||||
virtual uint8_t mreq_r(offs_t offset) override;
|
||||
virtual uint8_t iorq_r(offs_t offset) override;
|
||||
virtual void iorq_w(offs_t offset, uint8_t data) override;
|
||||
virtual DECLARE_READ_LINE_MEMBER(romcs) override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(busy_w) { m_busy = state; };
|
||||
|
||||
required_memory_region m_rom;
|
||||
required_device<centronics_device> m_centronics;
|
||||
|
||||
int m_active;
|
||||
int m_romcs;
|
||||
int m_busy;
|
||||
};
|
||||
|
||||
class spectrum_kempcentreu_device :
|
||||
public spectrum_kempcentre_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
spectrum_kempcentreu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
|
||||
// optional information overrides
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
virtual void pre_opcode_fetch(offs_t offset) override;
|
||||
virtual uint8_t iorq_r(offs_t offset) override;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(SPECTRUM_LPRINT, spectrum_lprint_device)
|
||||
DECLARE_DEVICE_TYPE(SPECTRUM_LPRINT3, spectrum_lprint3_device)
|
||||
DECLARE_DEVICE_TYPE(SPECTRUM_KEMPCENTREF, spectrum_kempcentre_device)
|
||||
DECLARE_DEVICE_TYPE(SPECTRUM_KEMPCENTREU, spectrum_kempcentreu_device)
|
||||
|
||||
|
||||
#endif // MAME_BUS_SPECTRUM_LPRINT_H
|
@ -657,7 +657,7 @@ ROM_START( kingyoch )
|
||||
// YATAIMURA
|
||||
// KINGYOSUKUI EX
|
||||
DISK_REGION( "cflash" )
|
||||
DISK_IMAGE( "kingyo", 0, SHA1(f3685a0c6109b78f4812972b71bcec4ef9e9198f) )
|
||||
DISK_IMAGE( "kingyo", 0, SHA1(f3685a0c6109b78f4812972b71bcec4ef9e9198f) ) // free space contain other game leftovers, presumable Issyouni Wan Wan, encrypted, key is 511248c2
|
||||
|
||||
ROM_PARAMETER( ":rom_board:id", "5508" ) // 8x 512Mbit FlashROMs
|
||||
|
||||
|
@ -711,7 +711,7 @@ ROM_START( anakonda )
|
||||
ROM_LOAD( "anakonda.rom", 0x0000, 0x0800, CRC(50ba6462) SHA1(f55a9f8e78a3e97012e343ea35cd787fc45dae35) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( kharkovsky ) // Made in Kharkov, Ukraine
|
||||
ROM_START( kharkovsky ) // Made in Kharkiv, Ukraine
|
||||
ROM_REGION( 0x3000, "maincpu", ROMREGION_ERASEFF )
|
||||
ROM_LOAD( "zagr.bin", 0x0000, 0x0800, CRC(f86ba4db) SHA1(1f48c74ffce88f6e804f776c66d6c03059fca117) )
|
||||
ROM_LOAD( "mon.bin", 0x0800, 0x0800, CRC(2dd1b6d2) SHA1(d5a02a9645f57eb0295d6b8d8cd8c589b47ba591) )
|
||||
|
Loading…
Reference in New Issue
Block a user