diff options
author | 2014-05-24 13:35:26 +0000 | |
---|---|---|
committer | 2014-05-24 13:35:26 +0000 | |
commit | ca17664d304642ab204f4501a6b7c89225adb718 (patch) | |
tree | f0d92e2005417464c05b9d18c03ef6c66f475985 | |
parent | 77074b15d4a63b40094f4ac9cf98daedc2e3ad7e (diff) |
(MESS) ql: Started expansion port slotification. (nw)
-rw-r--r-- | .gitattributes | 10 | ||||
-rw-r--r-- | src/emu/bus/bus.mak | 14 | ||||
-rw-r--r-- | src/emu/bus/ql/exp.c | 180 | ||||
-rw-r--r-- | src/emu/bus/ql/exp.h | 276 | ||||
-rw-r--r-- | src/emu/bus/ql/qimi.c | 250 | ||||
-rw-r--r-- | src/emu/bus/ql/qimi.h | 112 | ||||
-rw-r--r-- | src/emu/bus/ql/sandy_superdisk.c | 200 | ||||
-rw-r--r-- | src/emu/bus/ql/sandy_superdisk.h | 110 | ||||
-rw-r--r-- | src/emu/bus/ql/sandy_superqboard.c | 200 | ||||
-rw-r--r-- | src/emu/bus/ql/sandy_superqboard.h | 112 | ||||
-rw-r--r-- | src/emu/bus/ql/trumpcard.c | 200 | ||||
-rw-r--r-- | src/emu/bus/ql/trumpcard.h | 108 | ||||
-rw-r--r-- | src/mess/drivers/ql.c | 20 | ||||
-rw-r--r-- | src/mess/includes/ql.h | 16 | ||||
-rw-r--r-- | src/mess/mess.mak | 1 |
15 files changed, 1793 insertions, 16 deletions
diff --git a/.gitattributes b/.gitattributes index 14665461518..4ea530d8cce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1238,6 +1238,16 @@ src/emu/bus/plus4/std.c svneol=native#text/plain src/emu/bus/plus4/std.h svneol=native#text/plain src/emu/bus/plus4/user.c svneol=native#text/plain src/emu/bus/plus4/user.h svneol=native#text/plain +src/emu/bus/ql/exp.c svneol=native#text/plain +src/emu/bus/ql/exp.h svneol=native#text/plain +src/emu/bus/ql/qimi.c svneol=native#text/plain +src/emu/bus/ql/qimi.h svneol=native#text/plain +src/emu/bus/ql/sandy_superdisk.c svneol=native#text/plain +src/emu/bus/ql/sandy_superdisk.h svneol=native#text/plain +src/emu/bus/ql/sandy_superqboard.c svneol=native#text/plain +src/emu/bus/ql/sandy_superqboard.h svneol=native#text/plain +src/emu/bus/ql/trumpcard.c svneol=native#text/plain +src/emu/bus/ql/trumpcard.h svneol=native#text/plain src/emu/bus/rs232/keyboard.c svneol=native#text/plain src/emu/bus/rs232/keyboard.h svneol=native#text/plain src/emu/bus/rs232/loopback.c svneol=native#text/plain diff --git a/src/emu/bus/bus.mak b/src/emu/bus/bus.mak index 72205587714..d8a479f8bab 100644 --- a/src/emu/bus/bus.mak +++ b/src/emu/bus/bus.mak @@ -1133,3 +1133,17 @@ BUSOBJS += $(BUSOBJ)/zorro/a590.o BUSOBJS += $(BUSOBJ)/zorro/action_replay.o BUSOBJS += $(BUSOBJ)/zorro/buddha.o endif + +#------------------------------------------------- +# +#@src/emu/bus/ql/exp.h,BUSES += QL +#------------------------------------------------- + +ifneq ($(filter QL,$(BUSES)),) +OBJDIRS += $(BUSOBJ)/ql +BUSOBJS += $(BUSOBJ)/ql/exp.o +BUSOBJS += $(BUSOBJ)/ql/qimi.o +BUSOBJS += $(BUSOBJ)/ql/sandy_superdisk.o +BUSOBJS += $(BUSOBJ)/ql/sandy_superqboard.o +BUSOBJS += $(BUSOBJ)/ql/trumpcard.o +endif diff --git a/src/emu/bus/ql/exp.c b/src/emu/bus/ql/exp.c new file mode 100644 index 00000000000..dde157fd960 --- /dev/null +++ b/src/emu/bus/ql/exp.c @@ -0,0 +1,180 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sinclair QL expansion port emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "exp.h" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type QL_EXPANSION_SLOT = &device_creator<ql_expansion_slot_t>; + + + +//************************************************************************** +// DEVICE QL_EXPANSION CARD INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_ql_expansion_card_interface - constructor +//------------------------------------------------- + +device_ql_expansion_card_interface::device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device) : + device_slot_card_interface(mconfig, device) +{ + m_slot = dynamic_cast<ql_expansion_slot_t *>(device.owner()); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ql_expansion_slot_t - constructor +//------------------------------------------------- + +ql_expansion_slot_t::ql_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, QL_EXPANSION_SLOT, "QL expansion port", tag, owner, clock, "ql_expansion_slot", __FILE__), + device_slot_interface(mconfig, *this), + m_write_ipl0l(*this), + m_write_ipl1l(*this), + m_write_berrl(*this), + m_write_extintl(*this) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ql_expansion_slot_t::device_start() +{ + m_card = dynamic_cast<device_ql_expansion_card_interface *>(get_card_device()); + + // resolve callbacks + m_write_ipl0l.resolve_safe(); + m_write_ipl1l.resolve_safe(); + m_write_berrl.resolve_safe(); + m_write_extintl.resolve_safe(); +} + + +//------------------------------------------------- +// SLOT_INTERFACE( ql_expansion_cards ) +//------------------------------------------------- + +// slot devices +#include "qimi.h" +#include "sandy_superdisk.h" +#include "sandy_superqboard.h" +#include "trumpcard.h" + +SLOT_INTERFACE_START( ql_expansion_cards ) + SLOT_INTERFACE("qimi", QIMI) + SLOT_INTERFACE("superdisk", SANDY_SUPER_DISK) + SLOT_INTERFACE("superqboard", SANDY_SUPERQBOARD) + SLOT_INTERFACE("trumpcard", QL_TRUMP_CARD) +SLOT_INTERFACE_END +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sinclair QL expansion port emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "exp.h" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type QL_EXPANSION_SLOT = &device_creator<ql_expansion_slot_t>; + + + +//************************************************************************** +// DEVICE QL_EXPANSION CARD INTERFACE +//************************************************************************** + +//------------------------------------------------- +// device_ql_expansion_card_interface - constructor +//------------------------------------------------- + +device_ql_expansion_card_interface::device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device) : + device_slot_card_interface(mconfig, device) +{ + m_slot = dynamic_cast<ql_expansion_slot_t *>(device.owner()); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ql_expansion_slot_t - constructor +//------------------------------------------------- + +ql_expansion_slot_t::ql_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, QL_EXPANSION_SLOT, "QL expansion port", tag, owner, clock, "ql_expansion_slot", __FILE__), + device_slot_interface(mconfig, *this), + m_write_ipl0l(*this), + m_write_ipl1l(*this), + m_write_berrl(*this), + m_write_extintl(*this) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ql_expansion_slot_t::device_start() +{ + m_card = dynamic_cast<device_ql_expansion_card_interface *>(get_card_device()); + + // resolve callbacks + m_write_ipl0l.resolve_safe(); + m_write_ipl1l.resolve_safe(); + m_write_berrl.resolve_safe(); + m_write_extintl.resolve_safe(); +} + + +//------------------------------------------------- +// SLOT_INTERFACE( ql_expansion_cards ) +//------------------------------------------------- + +// slot devices +#include "qimi.h" +#include "sandy_superdisk.h" +#include "sandy_superqboard.h" +#include "trumpcard.h" + +SLOT_INTERFACE_START( ql_expansion_cards ) + SLOT_INTERFACE("qimi", QIMI) + SLOT_INTERFACE("superdisk", SANDY_SUPER_DISK) + SLOT_INTERFACE("superqboard", SANDY_SUPERQBOARD) + SLOT_INTERFACE("trumpcard", QL_TRUMP_CARD) +SLOT_INTERFACE_END diff --git a/src/emu/bus/ql/exp.h b/src/emu/bus/ql/exp.h new file mode 100644 index 00000000000..a57c4de8651 --- /dev/null +++ b/src/emu/bus/ql/exp.h @@ -0,0 +1,276 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sinclair QL expansion port emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +********************************************************************** + + A B + GND * 1 * GND + D3 * 2 * D2 + D4 * 3 * D1 + D5 * 4 * D0 + D6 * 5 * ASL + D7 * 6 * DSL + A19 * 7 * RDWL + A18 * 8 * DTACKL + A17 * 9 * BGL + A16 * 10 * BRL + CLKCPU * 11 * A15 + RED * 12 * RESETCPUL + A14 * 13 * CSYNCL + A13 * 14 * E + A12 * 15 * VSYNCH + A11 * 16 * VPAL + A10 * 17 * GREEN + A9 * 18 * BLUE + A8 * 19 * FC2 + A7 * 20 * FC1 + A6 * 21 * FC0 + A5 * 22 * A0 + A4 * 23 * ROMOEH + A3 * 24 * A1 + DBGL * 25 * A2 + SP2 * 26 * SP3 + DSCML * 27 * IPL0L + SP1 * 28 * BERRL + SP0 * 29 * IPL1L + VP12 * 30 * EXTINTL + VM12 * 31 * VIN + VIN * 32 * VIN + +**********************************************************************/ + +#pragma once + +#ifndef __QL_EXPANSION_SLOT__ +#define __QL_EXPANSION_SLOT__ + +#include "emu.h" + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_QL_EXPANSION_SLOT_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, QL_EXPANSION_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) + + +#define MCFG_QL_EXPANSION_SLOT_IPL0L_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_ipl0l_wr_callback(*device, DEVCB_##_write); + +#define MCFG_QL_EXPANSION_SLOT_IPL1L_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_ipl1l_wr_callback(*device, DEVCB_##_write); + +#define MCFG_QL_EXPANSION_SLOT_BERRL_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_berrl_wr_callback(*device, DEVCB_##_write); + +#define MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_extintl_wr_callback(*device, DEVCB_##_write); + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> device_ql_expansion_card_interface + +class ql_expansion_slot_t; + +class device_ql_expansion_card_interface : public device_slot_card_interface +{ + friend class ql_expansion_slot_t; + +public: + // construction/destruction + device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device); + +protected: + ql_expansion_slot_t *m_slot; +}; + + +// ======================> ql_expansion_slot_t + +class ql_expansion_slot_t : public device_t, + public device_slot_interface +{ +public: + // construction/destruction + ql_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + template<class _Object> static devcb_base &set_ipl0l_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_ipl0l.set_callback(object); } + template<class _Object> static devcb_base &set_ipl1l_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_ipl1l.set_callback(object); } + template<class _Object> static devcb_base &set_berrl_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_berrl.set_callback(object); } + template<class _Object> static devcb_base &set_extintl_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_extintl.set_callback(object); } + + DECLARE_WRITE_LINE_MEMBER( extintl_w ) { m_write_extintl(state); } + +protected: + // device-level overrides + virtual void device_start(); + + devcb_write_line m_write_ipl0l; + devcb_write_line m_write_ipl1l; + devcb_write_line m_write_berrl; + devcb_write_line m_write_extintl; + + device_ql_expansion_card_interface *m_card; +}; + + +// device type definition +extern const device_type QL_EXPANSION_SLOT; + + +SLOT_INTERFACE_EXTERN( ql_expansion_cards ); + + + +#endif +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sinclair QL expansion port emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +********************************************************************** + + A B + GND * 1 * GND + D3 * 2 * D2 + D4 * 3 * D1 + D5 * 4 * D0 + D6 * 5 * ASL + D7 * 6 * DSL + A19 * 7 * RDWL + A18 * 8 * DTACKL + A17 * 9 * BGL + A16 * 10 * BRL + CLKCPU * 11 * A15 + RED * 12 * RESETCPUL + A14 * 13 * CSYNCL + A13 * 14 * E + A12 * 15 * VSYNCH + A11 * 16 * VPAL + A10 * 17 * GREEN + A9 * 18 * BLUE + A8 * 19 * FC2 + A7 * 20 * FC1 + A6 * 21 * FC0 + A5 * 22 * A0 + A4 * 23 * ROMOEH + A3 * 24 * A1 + DBGL * 25 * A2 + SP2 * 26 * SP3 + DSCML * 27 * IPL0L + SP1 * 28 * BERRL + SP0 * 29 * IPL1L + VP12 * 30 * EXTINTL + VM12 * 31 * VIN + VIN * 32 * VIN + +**********************************************************************/ + +#pragma once + +#ifndef __QL_EXPANSION_SLOT__ +#define __QL_EXPANSION_SLOT__ + +#include "emu.h" + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_QL_EXPANSION_SLOT_ADD(_tag, _slot_intf, _def_slot) \ + MCFG_DEVICE_ADD(_tag, QL_EXPANSION_SLOT, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) + + +#define MCFG_QL_EXPANSION_SLOT_IPL0L_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_ipl0l_wr_callback(*device, DEVCB_##_write); + +#define MCFG_QL_EXPANSION_SLOT_IPL1L_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_ipl1l_wr_callback(*device, DEVCB_##_write); + +#define MCFG_QL_EXPANSION_SLOT_BERRL_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_berrl_wr_callback(*device, DEVCB_##_write); + +#define MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(_write) \ + devcb = &ql_expansion_slot_t::set_extintl_wr_callback(*device, DEVCB_##_write); + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> device_ql_expansion_card_interface + +class ql_expansion_slot_t; + +class device_ql_expansion_card_interface : public device_slot_card_interface +{ + friend class ql_expansion_slot_t; + +public: + // construction/destruction + device_ql_expansion_card_interface(const machine_config &mconfig, device_t &device); + +protected: + ql_expansion_slot_t *m_slot; +}; + + +// ======================> ql_expansion_slot_t + +class ql_expansion_slot_t : public device_t, + public device_slot_interface +{ +public: + // construction/destruction + ql_expansion_slot_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + template<class _Object> static devcb_base &set_ipl0l_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_ipl0l.set_callback(object); } + template<class _Object> static devcb_base &set_ipl1l_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_ipl1l.set_callback(object); } + template<class _Object> static devcb_base &set_berrl_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_berrl.set_callback(object); } + template<class _Object> static devcb_base &set_extintl_wr_callback(device_t &device, _Object object) { return downcast<ql_expansion_slot_t &>(device).m_write_extintl.set_callback(object); } + + DECLARE_WRITE_LINE_MEMBER( extintl_w ) { m_write_extintl(state); } + +protected: + // device-level overrides + virtual void device_start(); + + devcb_write_line m_write_ipl0l; + devcb_write_line m_write_ipl1l; + devcb_write_line m_write_berrl; + devcb_write_line m_write_extintl; + + device_ql_expansion_card_interface *m_card; +}; + + +// device type definition +extern const device_type QL_EXPANSION_SLOT; + + +SLOT_INTERFACE_EXTERN( ql_expansion_cards ); + + + +#endif diff --git a/src/emu/bus/ql/qimi.c b/src/emu/bus/ql/qimi.c new file mode 100644 index 00000000000..64c32e0319a --- /dev/null +++ b/src/emu/bus/ql/qimi.c @@ -0,0 +1,250 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + QIMI (QL Internal Mouse Interface) emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "qimi.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + +#define MOUSEX_TAG "MOUSEX" +#define MOUSEY_TAG "MOUSEY" +#define MOUSEB_TAG "MOUSEB" + + +// Mouse bits in Sandy port order +#define MOUSE_MIDDLE 0x02 +#define MOUSE_RIGHT 0x04 +#define MOUSE_LEFT 0x08 +#define MOUSE_DIRY 0x10 +#define MOUSE_DIRX 0x20 +#define MOUSE_INTY 0x40 +#define MOUSE_INTX 0x80 +#define MOUSE_INT_MASK (MOUSE_INTX | MOUSE_INTY) + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type QIMI = &device_creator<qimi_t>; + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( qimi ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( qimi ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor qimi_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( qimi ); +} + + +//------------------------------------------------- +// INPUT_PORTS( qimi ) +//------------------------------------------------- + +static INPUT_PORTS_START( qimi ) + PORT_START(MOUSEX_TAG) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) + + PORT_START(MOUSEY_TAG) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) + + PORT_START(MOUSEB_TAG) /* Mouse buttons */ + PORT_BIT( MOUSE_RIGHT, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Mouse Button 1") PORT_CODE(MOUSECODE_BUTTON1) + PORT_BIT( MOUSE_LEFT, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Mouse Button 2") PORT_CODE(MOUSECODE_BUTTON2) + PORT_BIT( MOUSE_MIDDLE, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Mouse Button 3") PORT_CODE(MOUSECODE_BUTTON3) +INPUT_PORTS_END + + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor qimi_t::device_input_ports() const +{ + return INPUT_PORTS_NAME( qimi ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// qimi_t - constructor +//------------------------------------------------- + +qimi_t::qimi_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, QIMI, "QIMI", tag, owner, clock, "qimi", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_mousex(*this, MOUSEX_TAG), + m_mousey(*this, MOUSEY_TAG), + m_mouseb(*this, MOUSEB_TAG) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void qimi_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void qimi_t::device_reset() +{ +} +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + QIMI (QL Internal Mouse Interface) emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "qimi.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + +#define MOUSEX_TAG "MOUSEX" +#define MOUSEY_TAG "MOUSEY" +#define MOUSEB_TAG "MOUSEB" + + +// Mouse bits in Sandy port order +#define MOUSE_MIDDLE 0x02 +#define MOUSE_RIGHT 0x04 +#define MOUSE_LEFT 0x08 +#define MOUSE_DIRY 0x10 +#define MOUSE_DIRX 0x20 +#define MOUSE_INTY 0x40 +#define MOUSE_INTX 0x80 +#define MOUSE_INT_MASK (MOUSE_INTX | MOUSE_INTY) + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type QIMI = &device_creator<qimi_t>; + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( qimi ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( qimi ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor qimi_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( qimi ); +} + + +//------------------------------------------------- +// INPUT_PORTS( qimi ) +//------------------------------------------------- + +static INPUT_PORTS_START( qimi ) + PORT_START(MOUSEX_TAG) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) + + PORT_START(MOUSEY_TAG) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) + + PORT_START(MOUSEB_TAG) /* Mouse buttons */ + PORT_BIT( MOUSE_RIGHT, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Mouse Button 1") PORT_CODE(MOUSECODE_BUTTON1) + PORT_BIT( MOUSE_LEFT, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_NAME("Mouse Button 2") PORT_CODE(MOUSECODE_BUTTON2) + PORT_BIT( MOUSE_MIDDLE, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_NAME("Mouse Button 3") PORT_CODE(MOUSECODE_BUTTON3) +INPUT_PORTS_END + + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor qimi_t::device_input_ports() const +{ + return INPUT_PORTS_NAME( qimi ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// qimi_t - constructor +//------------------------------------------------- + +qimi_t::qimi_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, QIMI, "QIMI", tag, owner, clock, "qimi", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_mousex(*this, MOUSEX_TAG), + m_mousey(*this, MOUSEY_TAG), + m_mouseb(*this, MOUSEB_TAG) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void qimi_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void qimi_t::device_reset() +{ +} diff --git a/src/emu/bus/ql/qimi.h b/src/emu/bus/ql/qimi.h new file mode 100644 index 00000000000..8189ae753ac --- /dev/null +++ b/src/emu/bus/ql/qimi.h @@ -0,0 +1,112 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + QIMI (QL Internal Mouse Interface) emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __QIMI__ +#define __QIMI__ + +#include "exp.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> qimi_device + +class qimi_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + qimi_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual ioport_constructor device_input_ports() const; + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_ioport m_mousex; + required_ioport m_mousey; + required_ioport m_mouseb; +}; + + +// device type definition +extern const device_type QIMI; + + +#endif +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + QIMI (QL Internal Mouse Interface) emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __QIMI__ +#define __QIMI__ + +#include "exp.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> qimi_device + +class qimi_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + qimi_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const; + virtual ioport_constructor device_input_ports() const; + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_ioport m_mousex; + required_ioport m_mousey; + required_ioport m_mouseb; +}; + + +// device type definition +extern const device_type QIMI; + + +#endif diff --git a/src/emu/bus/ql/sandy_superdisk.c b/src/emu/bus/ql/sandy_superdisk.c new file mode 100644 index 00000000000..ad1fe75befd --- /dev/null +++ b/src/emu/bus/ql/sandy_superdisk.c @@ -0,0 +1,200 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy Super Disk emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "sandy_superdisk.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type SANDY_SUPER_DISK = &device_creator<sandy_super_disk_t>; + + +//------------------------------------------------- +// ROM( sandy_super_disk ) +//------------------------------------------------- + +ROM_START( sandy_super_disk ) + ROM_REGION( 0x4000, "rom", 0 ) + ROM_LOAD( "sandysuperdisk.rom", 0x0000, 0x4000, CRC(b52077da) SHA1(bf531758145ffd083e01c1cf9c45d0e9264a3b53) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *sandy_super_disk_t::device_rom_region() const +{ + return ROM_NAME( sandy_super_disk ); +} + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( sandy_super_disk ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( sandy_super_disk ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor sandy_super_disk_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( sandy_super_disk ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// sandy_super_disk_t - constructor +//------------------------------------------------- + +sandy_super_disk_t::sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, SANDY_SUPER_DISK, "Sandy Super Disk", tag, owner, clock, "sandy_super_disk", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_rom(*this, "rom") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void sandy_super_disk_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void sandy_super_disk_t::device_reset() +{ +} +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy Super Disk emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "sandy_superdisk.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type SANDY_SUPER_DISK = &device_creator<sandy_super_disk_t>; + + +//------------------------------------------------- +// ROM( sandy_super_disk ) +//------------------------------------------------- + +ROM_START( sandy_super_disk ) + ROM_REGION( 0x4000, "rom", 0 ) + ROM_LOAD( "sandysuperdisk.rom", 0x0000, 0x4000, CRC(b52077da) SHA1(bf531758145ffd083e01c1cf9c45d0e9264a3b53) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *sandy_super_disk_t::device_rom_region() const +{ + return ROM_NAME( sandy_super_disk ); +} + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( sandy_super_disk ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( sandy_super_disk ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor sandy_super_disk_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( sandy_super_disk ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// sandy_super_disk_t - constructor +//------------------------------------------------- + +sandy_super_disk_t::sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, SANDY_SUPER_DISK, "Sandy Super Disk", tag, owner, clock, "sandy_super_disk", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_rom(*this, "rom") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void sandy_super_disk_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void sandy_super_disk_t::device_reset() +{ +} diff --git a/src/emu/bus/ql/sandy_superdisk.h b/src/emu/bus/ql/sandy_superdisk.h new file mode 100644 index 00000000000..17489bb76cb --- /dev/null +++ b/src/emu/bus/ql/sandy_superdisk.h @@ -0,0 +1,110 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy Super Disk emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __SANDY_SUPER_DISK__ +#define __SANDY_SUPER_DISK__ + +#include "exp.h" +#include "machine/wd_fdc.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> sandy_super_disk_device + +class sandy_super_disk_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // 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(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_memory_region m_rom; +}; + + +// device type definition +extern const device_type SANDY_SUPER_DISK; + + +#endif +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy Super Disk emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __SANDY_SUPER_DISK__ +#define __SANDY_SUPER_DISK__ + +#include "exp.h" +#include "machine/wd_fdc.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> sandy_super_disk_device + +class sandy_super_disk_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + sandy_super_disk_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // 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(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_memory_region m_rom; +}; + + +// device type definition +extern const device_type SANDY_SUPER_DISK; + + +#endif diff --git a/src/emu/bus/ql/sandy_superqboard.c b/src/emu/bus/ql/sandy_superqboard.c new file mode 100644 index 00000000000..ec4c98ba20e --- /dev/null +++ b/src/emu/bus/ql/sandy_superqboard.c @@ -0,0 +1,200 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy SuperQBoard emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "sandy_superqboard.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type SANDY_SUPERQBOARD = &device_creator<sandy_superqboard_t>; + + +//------------------------------------------------- +// ROM( sandy_superqboard ) +//------------------------------------------------- + +ROM_START( sandy_superqboard ) + ROM_REGION( 0x8000, "rom", 0 ) + ROM_LOAD( "sandy_disk_controller_v1.18y_1984.rom", 0x0000, 0x8000, CRC(d02425be) SHA1(e730576e3e0c6a1acad042c09e15fc62a32d8fbd) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *sandy_superqboard_t::device_rom_region() const +{ + return ROM_NAME( sandy_superqboard ); +} + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( sandy_superqboard ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( sandy_superqboard ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor sandy_superqboard_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( sandy_superqboard ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// sandy_superqboard_t - constructor +//------------------------------------------------- + +sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, SANDY_SUPERQBOARD, "SANDY_SUPERQBOARD", tag, owner, clock, "sandy_superqboard", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_rom(*this, "rom") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void sandy_superqboard_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void sandy_superqboard_t::device_reset() +{ +} +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy SuperQBoard emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "sandy_superqboard.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type SANDY_SUPERQBOARD = &device_creator<sandy_superqboard_t>; + + +//------------------------------------------------- +// ROM( sandy_superqboard ) +//------------------------------------------------- + +ROM_START( sandy_superqboard ) + ROM_REGION( 0x8000, "rom", 0 ) + ROM_LOAD( "sandy_disk_controller_v1.18y_1984.rom", 0x0000, 0x8000, CRC(d02425be) SHA1(e730576e3e0c6a1acad042c09e15fc62a32d8fbd) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *sandy_superqboard_t::device_rom_region() const +{ + return ROM_NAME( sandy_superqboard ); +} + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( sandy_superqboard ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( sandy_superqboard ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor sandy_superqboard_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( sandy_superqboard ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// sandy_superqboard_t - constructor +//------------------------------------------------- + +sandy_superqboard_t::sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, SANDY_SUPERQBOARD, "SANDY_SUPERQBOARD", tag, owner, clock, "sandy_superqboard", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_rom(*this, "rom") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void sandy_superqboard_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void sandy_superqboard_t::device_reset() +{ +} diff --git a/src/emu/bus/ql/sandy_superqboard.h b/src/emu/bus/ql/sandy_superqboard.h new file mode 100644 index 00000000000..03f339648fb --- /dev/null +++ b/src/emu/bus/ql/sandy_superqboard.h @@ -0,0 +1,112 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy SuperQBoard emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __SANDY_SUPERQBOARD__ +#define __SANDY_SUPERQBOARD__ + +#include "exp.h" +#include "bus/centronics/ctronics.h" +#include "machine/wd_fdc.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> sandy_superqboard_device + +class sandy_superqboard_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // 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(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_memory_region m_rom; +}; + + +// device type definition +extern const device_type SANDY_SUPERQBOARD; + + +#endif +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Sandy SuperQBoard emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __SANDY_SUPERQBOARD__ +#define __SANDY_SUPERQBOARD__ + +#include "exp.h" +#include "bus/centronics/ctronics.h" +#include "machine/wd_fdc.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> sandy_superqboard_device + +class sandy_superqboard_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + sandy_superqboard_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // 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(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_memory_region m_rom; +}; + + +// device type definition +extern const device_type SANDY_SUPERQBOARD; + + +#endif diff --git a/src/emu/bus/ql/trumpcard.c b/src/emu/bus/ql/trumpcard.c new file mode 100644 index 00000000000..eea94346738 --- /dev/null +++ b/src/emu/bus/ql/trumpcard.c @@ -0,0 +1,200 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Miracle Systems QL Trump Card emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "trumpcard.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type QL_TRUMP_CARD = &device_creator<ql_trump_card_t>; + + +//------------------------------------------------- +// ROM( ql_trump_card ) +//------------------------------------------------- + +ROM_START( ql_trump_card ) + ROM_REGION( 0x8000, "rom", 0 ) + ROM_LOAD( "trumpcard-125.rom", 0x0000, 0x8000, CRC(938eaa46) SHA1(9b3458cf3a279ed86ba395dc45c8f26939d6c44d) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *ql_trump_card_t::device_rom_region() const +{ + return ROM_NAME( ql_trump_card ); +} + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( ql_trump_card ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( ql_trump_card ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor ql_trump_card_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( ql_trump_card ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ql_trump_card_t - constructor +//------------------------------------------------- + +ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "ql_trump_card", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_rom(*this, "rom") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ql_trump_card_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void ql_trump_card_t::device_reset() +{ +} +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Miracle Systems QL Trump Card emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "trumpcard.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type QL_TRUMP_CARD = &device_creator<ql_trump_card_t>; + + +//------------------------------------------------- +// ROM( ql_trump_card ) +//------------------------------------------------- + +ROM_START( ql_trump_card ) + ROM_REGION( 0x8000, "rom", 0 ) + ROM_LOAD( "trumpcard-125.rom", 0x0000, 0x8000, CRC(938eaa46) SHA1(9b3458cf3a279ed86ba395dc45c8f26939d6c44d) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *ql_trump_card_t::device_rom_region() const +{ + return ROM_NAME( ql_trump_card ); +} + + +//------------------------------------------------- +// MACHINE_CONFIG_FRAGMENT( ql_trump_card ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( ql_trump_card ) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor ql_trump_card_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( ql_trump_card ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// ql_trump_card_t - constructor +//------------------------------------------------- + +ql_trump_card_t::ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, QL_TRUMP_CARD, "QL Trump Card", tag, owner, clock, "ql_trump_card", __FILE__), + device_ql_expansion_card_interface(mconfig, *this), + m_rom(*this, "rom") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void ql_trump_card_t::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void ql_trump_card_t::device_reset() +{ +} diff --git a/src/emu/bus/ql/trumpcard.h b/src/emu/bus/ql/trumpcard.h new file mode 100644 index 00000000000..4f830cb9126 --- /dev/null +++ b/src/emu/bus/ql/trumpcard.h @@ -0,0 +1,108 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Miracle Systems QL Trump Card emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __QL_TRUMP_CARD__ +#define __QL_TRUMP_CARD__ + +#include "exp.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> ql_trump_card_t + +class ql_trump_card_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // 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(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_memory_region m_rom; +}; + + +// device type definition +extern const device_type QL_TRUMP_CARD; + + +#endif +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Miracle Systems QL Trump Card emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __QL_TRUMP_CARD__ +#define __QL_TRUMP_CARD__ + +#include "exp.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> ql_trump_card_t + +class ql_trump_card_t : public device_t, + public device_ql_expansion_card_interface +{ +public: + // construction/destruction + ql_trump_card_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // 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(); + virtual void device_reset(); + + // device_ql_expansion_card_interface overrides + +private: + required_memory_region m_rom; +}; + + +// device type definition +extern const device_type QL_TRUMP_CARD; + + +#endif diff --git a/src/mess/drivers/ql.c b/src/mess/drivers/ql.c index d458c27792e..e78d4c53d6d 100644 --- a/src/mess/drivers/ql.c +++ b/src/mess/drivers/ql.c @@ -75,21 +75,7 @@ */ -#include "emu.h" -#include "cpu/m68000/m68000.h" -#include "cpu/mcs48/mcs48.h" -#include "cpu/mcs51/mcs51.h" -#include "imagedev/cartslot.h" -#include "imagedev/flopdrv.h" -#include "imagedev/printer.h" -#include "machine/ram.h" -#include "machine/microdrv.h" -#include "formats/basicdsk.h" -#include "machine/zx8302.h" -#include "sound/speaker.h" -#include "video/zx8301.h" #include "includes/ql.h" -#include "machine/wd17xx.h" #include "debugger.h" #define LOG_DISK_WRITE 0 @@ -1127,6 +1113,12 @@ static MACHINE_CONFIG_START( ql, ql_state ) MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL) // wired as DTE MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ZX8302_TAG, zx8302_device, write_cts2)) + MCFG_QL_EXPANSION_SLOT_ADD("exp", ql_expansion_cards, NULL) + //MCFG_QL_EXPANSION_SLOT_IPL0L_CALLBACK() + //MCFG_QL_EXPANSION_SLOT_IPL1L_CALLBACK() + //MCFG_QL_EXPANSION_SLOT_BERRL_CALLBACK() + //MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK() + // cartridge MCFG_CARTSLOT_ADD("cart") MCFG_CARTSLOT_EXTENSION_LIST("bin,rom") diff --git a/src/mess/includes/ql.h b/src/mess/includes/ql.h index b1d1b319d28..447b6c34093 100644 --- a/src/mess/includes/ql.h +++ b/src/mess/includes/ql.h @@ -5,11 +5,23 @@ #ifndef __QL__ #define __QL__ +#include "emu.h" +#include "bus/centronics/ctronics.h" +#include "bus/ql/exp.h" #include "bus/rs232/rs232.h" +#include "cpu/m68000/m68000.h" +#include "cpu/mcs48/mcs48.h" +#include "cpu/mcs51/mcs51.h" +#include "formats/basicdsk.h" +#include "imagedev/cartslot.h" +#include "imagedev/flopdrv.h" +#include "imagedev/printer.h" #include "machine/ram.h" +#include "machine/microdrv.h" #include "machine/wd17xx.h" -#include "bus/centronics/ctronics.h" - +#include "machine/zx8302.h" +#include "sound/speaker.h" +#include "video/zx8301.h" #define SCREEN_TAG "screen" diff --git a/src/mess/mess.mak b/src/mess/mess.mak index 3370d5ab103..35fcbc8ad9e 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -598,6 +598,7 @@ BUSES += PC_JOY BUSES += PC_KBD BUSES += PET BUSES += PLUS4 +BUSES += QL BUSES += RS232 BUSES += S100 BUSES += SATURN |