mirror of
https://github.com/holub/mame
synced 2025-05-22 21:58:57 +03:00
vtech1: Use the slot system for I/O and Memory expansion slots. Emulate
the newly dumped RS-232 cartridge. Add support for the WordPro cartridge. Cleanup driver.
This commit is contained in:
parent
a10fdfedc1
commit
d93c9277c8
20
.gitattributes
vendored
20
.gitattributes
vendored
@ -1506,6 +1506,26 @@ src/emu/bus/vip/vp620.c svneol=native#text/plain
|
||||
src/emu/bus/vip/vp620.h svneol=native#text/plain
|
||||
src/emu/bus/vip/vp700.c svneol=native#text/plain
|
||||
src/emu/bus/vip/vp700.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/carts.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/carts.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/ioexp.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/ioexp.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/joystick.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/joystick.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/printer.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/ioexp/printer.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/carts.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/carts.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/floppy.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/floppy.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/memexp.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/memexp.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/memory.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/memory.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/rs232.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/rs232.h svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/wordpro.c svneol=native#text/plain
|
||||
src/emu/bus/vtech/memexp/wordpro.h svneol=native#text/plain
|
||||
src/emu/bus/wangpc/emb.c svneol=native#text/plain
|
||||
src/emu/bus/wangpc/emb.h svneol=native#text/plain
|
||||
src/emu/bus/wangpc/lic.c svneol=native#text/plain
|
||||
|
@ -1165,3 +1165,31 @@ BUSOBJS += $(BUSOBJ)/ql/rom.o
|
||||
BUSOBJS += $(BUSOBJ)/ql/miracle_hd.o
|
||||
BUSOBJS += $(BUSOBJ)/ql/std.o
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
#
|
||||
#@src/emu/bus/vtech/memexp/memexp.h,BUSES += VTECH_MEMEXP
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter VTECH_MEMEXP,$(BUSES)),)
|
||||
OBJDIRS += $(BUSOBJ)/vtech/memexp
|
||||
BUSOBJS += $(BUSOBJ)/vtech/memexp/memexp.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/memexp/carts.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/memexp/floppy.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/memexp/memory.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/memexp/rs232.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/memexp/wordpro.o
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
#
|
||||
#@src/emu/bus/vtech/ioexp/ioexp.h,BUSES += VTECH_IOEXP
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter VTECH_IOEXP,$(BUSES)),)
|
||||
OBJDIRS += $(BUSOBJ)/vtech/ioexp
|
||||
BUSOBJS += $(BUSOBJ)/vtech/ioexp/ioexp.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/ioexp/carts.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/ioexp/joystick.o
|
||||
BUSOBJS += $(BUSOBJ)/vtech/ioexp/printer.o
|
||||
endif
|
||||
|
12
src/emu/bus/vtech/ioexp/carts.c
Normal file
12
src/emu/bus/vtech/ioexp/carts.c
Normal file
@ -0,0 +1,12 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ I/O Expansion Slot Devices
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "carts.h"
|
||||
|
||||
SLOT_INTERFACE_START( ioexp_slot_carts )
|
||||
SLOT_INTERFACE("joystick", JOYSTICK_INTERFACE)
|
||||
SLOT_INTERFACE("printer", PRINTER_INTERFACE)
|
||||
SLOT_INTERFACE_END
|
19
src/emu/bus/vtech/ioexp/carts.h
Normal file
19
src/emu/bus/vtech/ioexp/carts.h
Normal file
@ -0,0 +1,19 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ I/O Expansion Slot Devices
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_IOEXP_CARTS_H__
|
||||
#define __VTECH_IOEXP_CARTS_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "joystick.h"
|
||||
#include "printer.h"
|
||||
|
||||
SLOT_INTERFACE_EXTERN( ioexp_slot_carts );
|
||||
|
||||
#endif // __VTECH_IOEXP_CARTS_H__
|
92
src/emu/bus/vtech/ioexp/ioexp.c
Normal file
92
src/emu/bus/vtech/ioexp/ioexp.c
Normal file
@ -0,0 +1,92 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ I/O Expansion Slot
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
30-pin slot
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "ioexp.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type IOEXP_SLOT = &device_creator<ioexp_slot_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// SLOT DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// ioexp_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
ioexp_slot_device::ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, IOEXP_SLOT, "Peripheral Expansion Slot", tag, owner, clock, "ioexp_slot", __FILE__),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_io(NULL),
|
||||
m_cart(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// ioexp_slot_device - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
ioexp_slot_device::~ioexp_slot_device()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void ioexp_slot_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void ioexp_slot_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void ioexp_slot_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARTRIDGE INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_ioexp_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_ioexp_interface::device_ioexp_interface(const machine_config &mconfig, device_t &device) :
|
||||
device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_slot = dynamic_cast<ioexp_slot_device *>(device.owner());
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_ioexp_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_ioexp_interface::~device_ioexp_interface()
|
||||
{
|
||||
}
|
88
src/emu/bus/vtech/ioexp/ioexp.h
Normal file
88
src/emu/bus/vtech/ioexp/ioexp.h
Normal file
@ -0,0 +1,88 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ I/O Expansion Slot
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
30-pin slot
|
||||
|
||||
15 GND 16 NC
|
||||
14 /WR 17 NC
|
||||
13 A3 18 NC
|
||||
12 A6 19 +5VDC
|
||||
11 A2 20 NC
|
||||
10 A5 21 D4
|
||||
9 D0 22 D5
|
||||
8 D2 23 D7
|
||||
7 D6 24 D1
|
||||
6 D3 25 /RD
|
||||
5 /IORQ 26 A1
|
||||
4 +5VDC 27 A4
|
||||
3 NC 28 A0
|
||||
2 NC 29 A7
|
||||
1 NC 30 NC
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_IOEXP_H__
|
||||
#define __VTECH_IOEXP_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_IOEXP_SLOT_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, IOEXP_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(ioexp_slot_carts, NULL, false)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class device_ioexp_interface;
|
||||
|
||||
class ioexp_slot_device : public device_t, public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~ioexp_slot_device();
|
||||
|
||||
void set_io_space(address_space *io);
|
||||
|
||||
address_space *m_io;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
device_ioexp_interface *m_cart;
|
||||
};
|
||||
|
||||
// class representing interface-specific live ioexp device
|
||||
class device_ioexp_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_ioexp_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_ioexp_interface();
|
||||
|
||||
protected:
|
||||
ioexp_slot_device *m_slot;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type IOEXP_SLOT;
|
||||
|
||||
// include here so drivers don't need to
|
||||
#include "carts.h"
|
||||
|
||||
#endif // __VTECH_IOEXP_H__
|
110
src/emu/bus/vtech/ioexp/joystick.c
Normal file
110
src/emu/bus/vtech/ioexp/joystick.c
Normal file
@ -0,0 +1,110 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Joystick Interface
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
VTech Laser JS 20
|
||||
Dick Smith Electronics X-7315
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "joystick.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type JOYSTICK_INTERFACE = &device_creator<joystick_interface_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// input_ports - device-specific input ports
|
||||
//-------------------------------------------------
|
||||
|
||||
static INPUT_PORTS_START( joystick )
|
||||
PORT_START("joystick_0")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
|
||||
PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("joystick_0_arm")
|
||||
PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(1)
|
||||
PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("joystick_1")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
|
||||
PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
|
||||
PORT_START("joystick_1_arm")
|
||||
PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(2)
|
||||
PORT_BIT(0xe0, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor joystick_interface_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME( joystick );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// joystick_interface_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
joystick_interface_device::joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, JOYSTICK_INTERFACE, "Laser/VZ Joystick Interface", tag, owner, clock, "joystick", __FILE__),
|
||||
device_ioexp_interface(mconfig, *this),
|
||||
m_joy0(*this, "joystick_0"),
|
||||
m_joy0_arm(*this, "joystick_0_arm"),
|
||||
m_joy1(*this, "joystick_1"),
|
||||
m_joy1_arm(*this, "joystick_1_arm")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void joystick_interface_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void joystick_interface_device::device_reset()
|
||||
{
|
||||
m_slot->m_io->install_read_handler(0x20, 0x2f, read8_delegate(FUNC(joystick_interface_device::joystick_r), this));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
READ8_MEMBER( joystick_interface_device::joystick_r )
|
||||
{
|
||||
UINT8 data = 0xff;
|
||||
|
||||
if (!BIT(offset, 0)) data &= m_joy0->read();
|
||||
if (!BIT(offset, 1)) data &= m_joy0_arm->read();
|
||||
if (!BIT(offset, 2)) data &= m_joy1->read();
|
||||
if (!BIT(offset, 3)) data &= m_joy1_arm->read();
|
||||
|
||||
return data;
|
||||
}
|
51
src/emu/bus/vtech/ioexp/joystick.h
Normal file
51
src/emu/bus/vtech/ioexp/joystick.h
Normal file
@ -0,0 +1,51 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser Joystick Interface
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
VTech Laser JS 20
|
||||
Dick Smith Electronics X-7315
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_IOEXP_JOYSTICK_H__
|
||||
#define __VTECH_IOEXP_JOYSTICK_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "ioexp.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> joystick_interface_device
|
||||
|
||||
class joystick_interface_device : public device_t, public device_ioexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
joystick_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_READ8_MEMBER( joystick_r );
|
||||
|
||||
protected:
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
required_ioport m_joy0;
|
||||
required_ioport m_joy0_arm;
|
||||
required_ioport m_joy1;
|
||||
required_ioport m_joy1_arm;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type JOYSTICK_INTERFACE;
|
||||
|
||||
#endif // __VTECH_IOEXP_JOYSTICK_H__
|
94
src/emu/bus/vtech/ioexp/printer.c
Normal file
94
src/emu/bus/vtech/ioexp/printer.c
Normal file
@ -0,0 +1,94 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Printer Interface
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
VTech PI 20
|
||||
Dick Smith Electronics X-7320
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "printer.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type PRINTER_INTERFACE = &device_creator<printer_interface_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( printer_interface )
|
||||
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer")
|
||||
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(printer_interface_device, busy_w))
|
||||
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("latch", "centronics")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor printer_interface_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( printer_interface );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// printer_interface_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
printer_interface_device::printer_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, PRINTER_INTERFACE, "Laser/VZ Printer Interface", tag, owner, clock, "printer", __FILE__),
|
||||
device_ioexp_interface(mconfig, *this),
|
||||
m_centronics(*this, "centronics"),
|
||||
m_latch(*this, "latch"),
|
||||
m_centronics_busy(0)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void printer_interface_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void printer_interface_device::device_reset()
|
||||
{
|
||||
m_slot->m_io->install_read_handler(0x00, 0x00, read8_delegate(FUNC(printer_interface_device::busy_r), this));
|
||||
m_slot->m_io->install_write_handler(0x0d, 0x0d, write8_delegate(FUNC(printer_interface_device::strobe_w), this));
|
||||
m_slot->m_io->install_write_handler(0x0e, 0x0e, write8_delegate(FUNC(output_latch_device::write), m_latch.target()));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER( printer_interface_device::busy_w )
|
||||
{
|
||||
m_centronics_busy = state;
|
||||
}
|
||||
|
||||
READ8_MEMBER( printer_interface_device::busy_r )
|
||||
{
|
||||
return 0xfe | m_centronics_busy;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( printer_interface_device::strobe_w )
|
||||
{
|
||||
m_centronics->write_strobe(1);
|
||||
m_centronics->write_strobe(0);
|
||||
}
|
53
src/emu/bus/vtech/ioexp/printer.h
Normal file
53
src/emu/bus/vtech/ioexp/printer.h
Normal file
@ -0,0 +1,53 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Printer Interface
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
Dick Smith Electronics X-7320
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_IOEXP_PRINTER_H__
|
||||
#define __VTECH_IOEXP_PRINTER_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "ioexp.h"
|
||||
#include "bus/centronics/ctronics.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> printer_interface_device
|
||||
|
||||
class printer_interface_device : public device_t, public device_ioexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
printer_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( busy_w );
|
||||
DECLARE_READ8_MEMBER( busy_r );
|
||||
DECLARE_WRITE8_MEMBER( strobe_w );
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
required_device<centronics_device> m_centronics;
|
||||
required_device<output_latch_device> m_latch;
|
||||
|
||||
int m_centronics_busy;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type PRINTER_INTERFACE;
|
||||
|
||||
#endif // __VTECH_IOEXP_PRINTER_H__
|
17
src/emu/bus/vtech/memexp/carts.c
Normal file
17
src/emu/bus/vtech/memexp/carts.c
Normal file
@ -0,0 +1,17 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Memory Expansion Slot Devices
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "carts.h"
|
||||
|
||||
SLOT_INTERFACE_START( memexp_slot_carts )
|
||||
SLOT_INTERFACE("floppy", FLOPPY_CONTROLLER)
|
||||
SLOT_INTERFACE("laser110_16k", LASER110_16K)
|
||||
SLOT_INTERFACE("laser210_16k", LASER210_16K)
|
||||
SLOT_INTERFACE("laser310_16k", LASER310_16K)
|
||||
SLOT_INTERFACE("laser_64k", LASER_64K)
|
||||
SLOT_INTERFACE("rs232", RS232_INTERFACE)
|
||||
SLOT_INTERFACE("wordpro", WORDPRO)
|
||||
SLOT_INTERFACE_END
|
21
src/emu/bus/vtech/memexp/carts.h
Normal file
21
src/emu/bus/vtech/memexp/carts.h
Normal file
@ -0,0 +1,21 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Memory Expansion Slot Devices
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_MEMEXP_CARTS_H__
|
||||
#define __VTECH_MEMEXP_CARTS_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#include "floppy.h"
|
||||
#include "memory.h"
|
||||
#include "rs232.h"
|
||||
#include "wordpro.h"
|
||||
|
||||
SLOT_INTERFACE_EXTERN( memexp_slot_carts );
|
||||
|
||||
#endif // __VTECH_MEMEXP_CARTS_H__
|
356
src/emu/bus/vtech/memexp/floppy.c
Normal file
356
src/emu/bus/vtech/memexp/floppy.c
Normal file
@ -0,0 +1,356 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Floppy Controller Cartridge
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
Laser DD 20
|
||||
Dick Smith Electronics X-7304
|
||||
|
||||
TODO: Broken currently, fix & modernize
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "floppy.h"
|
||||
#include "formats/vtech1_dsk.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS / MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define VERBOSE 1
|
||||
|
||||
#define PHI0(n) (((n) >> 0) & 1)
|
||||
#define PHI1(n) (((n) >> 1) & 1)
|
||||
#define PHI2(n) (((n) >> 2) & 1)
|
||||
#define PHI3(n) (((n) >> 3) & 1)
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// FUNCTION PROTOTYPES
|
||||
//**************************************************************************
|
||||
|
||||
static void laser_load_proc(device_image_interface &image);
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type FLOPPY_CONTROLLER = &device_creator<floppy_controller_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( floppy )
|
||||
ROM_REGION(0x3000, "software", 0)
|
||||
ROM_LOAD("vzdos.rom", 0x0000, 0x2000, CRC(b6ed6084) SHA1(59d1cbcfa6c5e1906a32704fbf0d9670f0d1fd8b))
|
||||
ROM_END
|
||||
|
||||
const rom_entry *floppy_controller_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( floppy );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
static const floppy_interface laser_floppy_interface =
|
||||
{
|
||||
FLOPPY_STANDARD_5_25_DSHD,
|
||||
LEGACY_FLOPPY_OPTIONS_NAME(vtech1_only),
|
||||
NULL
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( floppy_controller )
|
||||
MCFG_MEMEXP_SLOT_ADD("mem")
|
||||
MCFG_LEGACY_FLOPPY_2_DRIVES_ADD(laser_floppy_interface)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor floppy_controller_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( floppy_controller );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// floppy_controller_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
floppy_controller_device::floppy_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, FLOPPY_CONTROLLER, "Laser/VZ Floppy Disk Controller", tag, owner, clock, "laserfdc", __FILE__),
|
||||
device_memexp_interface(mconfig, *this),
|
||||
m_memexp(*this, "mem"),
|
||||
m_floppy0(*this, "floppy0"),
|
||||
m_floppy1(*this, "floppy1")
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void floppy_controller_device::device_start()
|
||||
{
|
||||
m_drive = -1;
|
||||
m_fdc_track_x2[0] = 80;
|
||||
m_fdc_track_x2[1] = 80;
|
||||
m_fdc_wrprot[0] = 0x80;
|
||||
m_fdc_wrprot[1] = 0x80;
|
||||
m_fdc_status = 0;
|
||||
m_fdc_edge = 0;
|
||||
m_fdc_bits = 8;
|
||||
m_fdc_start = 0;
|
||||
m_fdc_write = 0;
|
||||
m_fdc_offs = 0;
|
||||
m_fdc_latch = 0;
|
||||
|
||||
m_floppy0->floppy_install_load_proc(laser_load_proc);
|
||||
m_floppy1->floppy_install_load_proc(laser_load_proc);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void floppy_controller_device::device_reset()
|
||||
{
|
||||
m_memexp->set_io_space(m_slot->m_io);
|
||||
m_memexp->set_program_space(m_slot->m_program);
|
||||
|
||||
m_slot->m_program->install_rom(0x4000, 0x5fff, memregion("software")->base());
|
||||
|
||||
m_slot->m_io->install_read_handler(0x10, 0x1f, read8_delegate(FUNC(floppy_controller_device::floppy_r), this));
|
||||
m_slot->m_io->install_write_handler(0x10, 0x1f, write8_delegate(FUNC(floppy_controller_device::floppy_w), this));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
int floppy_controller_device::get_floppy_id(device_image_interface *image)
|
||||
{
|
||||
if (image == dynamic_cast<device_image_interface *>(m_floppy0.target()))
|
||||
return 0;
|
||||
if (image == dynamic_cast<device_image_interface *>(m_floppy1.target()))
|
||||
return 1;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
device_image_interface *floppy_controller_device::get_floppy_device(int drive)
|
||||
{
|
||||
device_image_interface *image = NULL;
|
||||
|
||||
switch (drive)
|
||||
{
|
||||
case 0:
|
||||
image = dynamic_cast<device_image_interface *>(m_floppy0.target());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
image = dynamic_cast<device_image_interface *>(m_floppy1.target());
|
||||
break;
|
||||
}
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
static void laser_load_proc(device_image_interface &image)
|
||||
{
|
||||
floppy_controller_device *fdc = dynamic_cast<floppy_controller_device *>(image.device().owner());
|
||||
|
||||
int id = fdc->get_floppy_id(&image);
|
||||
|
||||
if (!image.is_readonly())
|
||||
fdc->m_fdc_wrprot[id] = 0x00;
|
||||
else
|
||||
fdc->m_fdc_wrprot[id] = 0x80;
|
||||
}
|
||||
|
||||
void floppy_controller_device::get_track()
|
||||
{
|
||||
device_image_interface *image = get_floppy_device(m_drive);
|
||||
|
||||
/* drive selected or and image file ok? */
|
||||
if (m_drive >= 0 && image->exists())
|
||||
{
|
||||
int size, offs;
|
||||
size = TRKSIZE_VZ;
|
||||
offs = TRKSIZE_VZ * m_fdc_track_x2[m_drive]/2;
|
||||
image->fseek(offs, SEEK_SET);
|
||||
// some disks have slightly larger header, make sure we capture the checksum at the end of the track
|
||||
size = image->fread(m_fdc_data, size+4);
|
||||
if (VERBOSE)
|
||||
logerror("get track @$%05x $%04x bytes\n", offs, size);
|
||||
}
|
||||
m_fdc_offs = 0;
|
||||
m_fdc_write = 0;
|
||||
}
|
||||
|
||||
void floppy_controller_device::put_track()
|
||||
{
|
||||
/* drive selected and image file ok? */
|
||||
if (m_drive >= 0 && floppy_get_device(machine(),m_drive) != NULL)
|
||||
{
|
||||
int size, offs;
|
||||
device_image_interface *image = get_floppy_device(m_drive);
|
||||
offs = TRKSIZE_VZ * m_fdc_track_x2[m_drive]/2;
|
||||
image->fseek(offs + m_fdc_start, SEEK_SET);
|
||||
size = image->fwrite(&m_fdc_data[m_fdc_start], m_fdc_write);
|
||||
if (VERBOSE)
|
||||
logerror("put track @$%05X+$%X $%04X/$%04X bytes\n", offs, m_fdc_start, size, m_fdc_write);
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER( floppy_controller_device::floppy_r )
|
||||
{
|
||||
int data = 0xff;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 1: /* data (read-only) */
|
||||
if (m_fdc_bits > 0)
|
||||
{
|
||||
if( m_fdc_status & 0x80 )
|
||||
m_fdc_bits--;
|
||||
data = (m_data >> m_fdc_bits) & 0xff;
|
||||
if (VERBOSE) {
|
||||
logerror("vtech1_fdc_r bits %d%d%d%d%d%d%d%d\n",
|
||||
(data>>7)&1,(data>>6)&1,(data>>5)&1,(data>>4)&1,
|
||||
(data>>3)&1,(data>>2)&1,(data>>1)&1,(data>>0)&1 );
|
||||
}
|
||||
}
|
||||
if (m_fdc_bits == 0)
|
||||
{
|
||||
m_data = m_fdc_data[m_fdc_offs];
|
||||
if (VERBOSE)
|
||||
logerror("vtech1_fdc_r %d : data ($%04X) $%02X\n", offset, m_fdc_offs, m_data);
|
||||
if(m_fdc_status & 0x80)
|
||||
{
|
||||
m_fdc_bits = 8;
|
||||
m_fdc_offs = (m_fdc_offs + 1) % TRKSIZE_FM;
|
||||
}
|
||||
m_fdc_status &= ~0x80;
|
||||
}
|
||||
break;
|
||||
case 2: /* polling (read-only) */
|
||||
/* fake */
|
||||
if (m_drive >= 0)
|
||||
m_fdc_status |= 0x80;
|
||||
data = m_fdc_status;
|
||||
break;
|
||||
case 3: /* write protect status (read-only) */
|
||||
if (m_drive >= 0)
|
||||
data = m_fdc_wrprot[m_drive];
|
||||
if (VERBOSE)
|
||||
logerror("vtech1_fdc_r %d : write_protect $%02X\n", offset, data);
|
||||
break;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( floppy_controller_device::floppy_w )
|
||||
{
|
||||
int drive;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0: /* latch (write-only) */
|
||||
drive = (data & 0x10) ? 0 : (data & 0x80) ? 1 : -1;
|
||||
if (drive != m_drive)
|
||||
{
|
||||
m_drive = drive;
|
||||
if (m_drive >= 0)
|
||||
get_track();
|
||||
}
|
||||
if (m_drive >= 0)
|
||||
{
|
||||
if ((PHI0(data) && !(PHI1(data) || PHI2(data) || PHI3(data)) && PHI1(m_fdc_latch)) ||
|
||||
(PHI1(data) && !(PHI0(data) || PHI2(data) || PHI3(data)) && PHI2(m_fdc_latch)) ||
|
||||
(PHI2(data) && !(PHI0(data) || PHI1(data) || PHI3(data)) && PHI3(m_fdc_latch)) ||
|
||||
(PHI3(data) && !(PHI0(data) || PHI1(data) || PHI2(data)) && PHI0(m_fdc_latch)))
|
||||
{
|
||||
if (m_fdc_track_x2[m_drive] > 0)
|
||||
m_fdc_track_x2[m_drive]--;
|
||||
if (VERBOSE)
|
||||
logerror("vtech1_fdc_w(%d) $%02X drive %d: stepout track #%2d.%d\n", offset, data, m_drive, m_fdc_track_x2[m_drive]/2,5*(m_fdc_track_x2[m_drive]&1));
|
||||
if ((m_fdc_track_x2[m_drive] & 1) == 0)
|
||||
get_track();
|
||||
}
|
||||
else
|
||||
if ((PHI0(data) && !(PHI1(data) || PHI2(data) || PHI3(data)) && PHI3(m_fdc_latch)) ||
|
||||
(PHI1(data) && !(PHI0(data) || PHI2(data) || PHI3(data)) && PHI0(m_fdc_latch)) ||
|
||||
(PHI2(data) && !(PHI0(data) || PHI1(data) || PHI3(data)) && PHI1(m_fdc_latch)) ||
|
||||
(PHI3(data) && !(PHI0(data) || PHI1(data) || PHI2(data)) && PHI2(m_fdc_latch)))
|
||||
{
|
||||
if (m_fdc_track_x2[m_drive] < 2*40)
|
||||
m_fdc_track_x2[m_drive]++;
|
||||
if (VERBOSE)
|
||||
logerror("vtech1_fdc_w(%d) $%02X drive %d: stepin track #%2d.%d\n", offset, data, m_drive, m_fdc_track_x2[m_drive]/2,5*(m_fdc_track_x2[m_drive]&1));
|
||||
if ((m_fdc_track_x2[m_drive] & 1) == 0)
|
||||
get_track();
|
||||
}
|
||||
if ((data & 0x40) == 0)
|
||||
{
|
||||
m_data <<= 1;
|
||||
if ((m_fdc_latch ^ data) & 0x20)
|
||||
m_data |= 1;
|
||||
if ((m_fdc_edge ^= 1) == 0)
|
||||
{
|
||||
m_fdc_bits--;
|
||||
|
||||
if (m_fdc_bits == 0)
|
||||
{
|
||||
UINT8 value = 0;
|
||||
m_data &= 0xffff;
|
||||
if (m_data & 0x4000 ) value |= 0x80;
|
||||
if (m_data & 0x1000 ) value |= 0x40;
|
||||
if (m_data & 0x0400 ) value |= 0x20;
|
||||
if (m_data & 0x0100 ) value |= 0x10;
|
||||
if (m_data & 0x0040 ) value |= 0x08;
|
||||
if (m_data & 0x0010 ) value |= 0x04;
|
||||
if (m_data & 0x0004 ) value |= 0x02;
|
||||
if (m_data & 0x0001 ) value |= 0x01;
|
||||
if (VERBOSE)
|
||||
logerror("vtech1_fdc_w(%d) data($%04X) $%02X <- $%02X ($%04X)\n", offset, m_fdc_offs, m_fdc_data[m_fdc_offs], value, m_data);
|
||||
m_fdc_data[m_fdc_offs] = value;
|
||||
m_fdc_offs = (m_fdc_offs + 1) % TRKSIZE_FM;
|
||||
m_fdc_write++;
|
||||
m_fdc_bits = 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* change of write signal? */
|
||||
if ((m_fdc_latch ^ data) & 0x40)
|
||||
{
|
||||
/* falling edge? */
|
||||
if (m_fdc_latch & 0x40)
|
||||
{
|
||||
m_fdc_start = m_fdc_offs;
|
||||
m_fdc_edge = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* data written to track before? */
|
||||
if (m_fdc_write)
|
||||
put_track();
|
||||
}
|
||||
m_fdc_bits = 8;
|
||||
m_fdc_write = 0;
|
||||
}
|
||||
}
|
||||
m_fdc_latch = data;
|
||||
break;
|
||||
}
|
||||
}
|
76
src/emu/bus/vtech/memexp/floppy.h
Normal file
76
src/emu/bus/vtech/memexp/floppy.h
Normal file
@ -0,0 +1,76 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Floppy Controller Cartridge
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
Laser DD 20
|
||||
Dick Smith Electronics X-7304
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_MEMEXP_FLOPPY_H__
|
||||
#define __VTECH_MEMEXP_FLOPPY_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "memexp.h"
|
||||
#include "imagedev/flopdrv.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> floppy_controller_device
|
||||
|
||||
class floppy_controller_device : public device_t, public device_memexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
floppy_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_READ8_MEMBER( floppy_r );
|
||||
DECLARE_WRITE8_MEMBER( floppy_w );
|
||||
|
||||
// accessed from loadproc
|
||||
int get_floppy_id(device_image_interface *image);
|
||||
UINT8 m_fdc_wrprot[2];
|
||||
|
||||
protected:
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
static const int TRKSIZE_VZ = 0x9a0; // arbitrary (actually from analyzing format)
|
||||
static const int TRKSIZE_FM = 3172; // size of a standard FM mode track
|
||||
|
||||
device_image_interface *get_floppy_device(int drive);
|
||||
void put_track();
|
||||
void get_track();
|
||||
|
||||
required_device<memexp_slot_device> m_memexp;
|
||||
required_device<legacy_floppy_image_device> m_floppy0;
|
||||
required_device<legacy_floppy_image_device> m_floppy1;
|
||||
|
||||
int m_drive;
|
||||
UINT8 m_fdc_track_x2[2];
|
||||
UINT8 m_fdc_status;
|
||||
UINT8 m_fdc_data[TRKSIZE_FM];
|
||||
int m_data;
|
||||
int m_fdc_edge;
|
||||
int m_fdc_bits;
|
||||
int m_fdc_start;
|
||||
int m_fdc_write;
|
||||
int m_fdc_offs;
|
||||
int m_fdc_latch;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type FLOPPY_CONTROLLER;
|
||||
|
||||
#endif // __VTECH_MEMEXP_FLOPPY_H__
|
109
src/emu/bus/vtech/memexp/memexp.c
Normal file
109
src/emu/bus/vtech/memexp/memexp.c
Normal file
@ -0,0 +1,109 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Memory Expansion Slot
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
44-pin slot
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "memexp.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type MEMEXP_SLOT = &device_creator<memexp_slot_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// SLOT DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// memexp_slot_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
memexp_slot_device::memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, MEMEXP_SLOT, "Memory Expansion Slot", tag, owner, clock, "memexp_slot", __FILE__),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_program(NULL),
|
||||
m_io(NULL),
|
||||
m_cart(NULL),
|
||||
m_int_handler(*this),
|
||||
m_nmi_handler(*this),
|
||||
m_reset_handler(*this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// memexp_slot_device - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
memexp_slot_device::~memexp_slot_device()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void memexp_slot_device::device_start()
|
||||
{
|
||||
// resolve callbacks
|
||||
m_int_handler.resolve_safe();
|
||||
m_nmi_handler.resolve_safe();
|
||||
m_reset_handler.resolve_safe();
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void memexp_slot_device::device_reset()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_program_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void memexp_slot_device::set_program_space(address_space *program)
|
||||
{
|
||||
m_program = program;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// set_io_space - set address space we are attached to
|
||||
//-------------------------------------------------
|
||||
|
||||
void memexp_slot_device::set_io_space(address_space *io)
|
||||
{
|
||||
m_io = io;
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CARTRIDGE INTERFACE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_memexp_interface - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_memexp_interface::device_memexp_interface(const machine_config &mconfig, device_t &device) :
|
||||
device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_slot = dynamic_cast<memexp_slot_device *>(device.owner());
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// ~device_memexp_interface - destructor
|
||||
//-------------------------------------------------
|
||||
|
||||
device_memexp_interface::~device_memexp_interface()
|
||||
{
|
||||
}
|
126
src/emu/bus/vtech/memexp/memexp.h
Normal file
126
src/emu/bus/vtech/memexp/memexp.h
Normal file
@ -0,0 +1,126 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Memory Expansion Slot
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
44-pin slot
|
||||
|
||||
22 GND 23 NC
|
||||
21 +5VDC 24 A11
|
||||
20 /IORQ 25 A12
|
||||
19 /RD 26 A13
|
||||
18 /NMI 27 A14
|
||||
17 /WAIT 28 A15
|
||||
16 /MI 29 CLK
|
||||
15 /RFSH 30 D4
|
||||
14 D7 31 D3
|
||||
13 D2 32 D5
|
||||
12 A1 33 D6
|
||||
11 A2 34 NC
|
||||
10 A3 35 A0
|
||||
9 A4 36 D0
|
||||
8 A5 37 D1
|
||||
7 A6 38 /INT
|
||||
6 A7 39 /HALT
|
||||
5 A8 40 /MERQ
|
||||
4 A9 41 /WR
|
||||
3 A10 42 /NC
|
||||
2 /RESET 43 +9VDC
|
||||
1 GND 44 NC
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_MEMEXP_H__
|
||||
#define __VTECH_MEMEXP_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_MEMEXP_SLOT_ADD(_tag) \
|
||||
MCFG_DEVICE_ADD(_tag, MEMEXP_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(memexp_slot_carts, NULL, false)
|
||||
|
||||
#define MCFG_MEMEXP_SLOT_INT_HANDLER(_devcb) \
|
||||
devcb = &memexp_device::set_int_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_MEMEXP_SLOT_NMI_HANDLER(_devcb) \
|
||||
devcb = &memexp_device::set_nmi_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_MEMEXP_SLOT_RESET_HANDLER(_devcb) \
|
||||
devcb = &memexp_device::set_reset_handler(*device, DEVCB_##_devcb);
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
class device_memexp_interface;
|
||||
|
||||
class memexp_slot_device : public device_t, public device_slot_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~memexp_slot_device();
|
||||
|
||||
void set_program_space(address_space *program);
|
||||
void set_io_space(address_space *io);
|
||||
|
||||
// callbacks
|
||||
template<class _Object> static devcb_base &set_int_handler(device_t &device, _Object object)
|
||||
{ return downcast<memexp_slot_device &>(device).m_int_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_nmi_handler(device_t &device, _Object object)
|
||||
{ return downcast<memexp_slot_device &>(device).m_nmi_handler.set_callback(object); }
|
||||
|
||||
template<class _Object> static devcb_base &set_reset_handler(device_t &device, _Object object)
|
||||
{ return downcast<memexp_slot_device &>(device).m_reset_handler.set_callback(object); }
|
||||
|
||||
// called from cart device
|
||||
DECLARE_WRITE_LINE_MEMBER( int_w ) { m_int_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( nmi_w ) { m_nmi_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( reset_w ) { m_reset_handler(state); }
|
||||
|
||||
address_space *m_program;
|
||||
address_space *m_io;
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
device_memexp_interface *m_cart;
|
||||
|
||||
private:
|
||||
devcb_write_line m_int_handler;
|
||||
devcb_write_line m_nmi_handler;
|
||||
devcb_write_line m_reset_handler;
|
||||
};
|
||||
|
||||
// class representing interface-specific live memexp device
|
||||
class device_memexp_interface : public device_slot_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
device_memexp_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_memexp_interface();
|
||||
|
||||
protected:
|
||||
memexp_slot_device *m_slot;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type MEMEXP_SLOT;
|
||||
|
||||
// include here so drivers don't need to
|
||||
#include "carts.h"
|
||||
|
||||
#endif // __VTECH_MEMEXP_H__
|
167
src/emu/bus/vtech/memexp/memory.c
Normal file
167
src/emu/bus/vtech/memexp/memory.c
Normal file
@ -0,0 +1,167 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Laser Memory Expansions
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "memory.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type LASER110_16K = &device_creator<laser110_16k_device>;
|
||||
const device_type LASER210_16K = &device_creator<laser210_16k_device>;
|
||||
const device_type LASER310_16K = &device_creator<laser310_16k_device>;
|
||||
const device_type LASER_64K = &device_creator<laser_64k_device>;
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LASER 110 16K DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// laser110_16k_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
laser110_16k_device::laser110_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, LASER110_16K, "Laser 110/200/VZ-200 16k Memory", tag, owner, clock, "laser110_16k", __FILE__),
|
||||
device_memexp_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser110_16k_device::device_start()
|
||||
{
|
||||
m_ram.resize(16 * 1024);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser110_16k_device::device_reset()
|
||||
{
|
||||
m_slot->m_program->install_ram(0x8000, 0xbfff, m_ram);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LASER 210 16K DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// laser210_16k_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
laser210_16k_device::laser210_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, LASER210_16K, "Laser 210/VZ-200 (DSE) 16k Memory", tag, owner, clock, "laser210_16k", __FILE__),
|
||||
device_memexp_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser210_16k_device::device_start()
|
||||
{
|
||||
m_ram.resize(16 * 1024);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser210_16k_device::device_reset()
|
||||
{
|
||||
m_slot->m_program->install_ram(0x9000, 0xcfff, m_ram);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// VZ300 16K DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// laser310_16k_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
laser310_16k_device::laser310_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, LASER310_16K, "Laser 310/VZ-300 16k Memory", tag, owner, clock, "laser310_16k", __FILE__),
|
||||
device_memexp_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser310_16k_device::device_start()
|
||||
{
|
||||
m_ram.resize(16 * 1024);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser310_16k_device::device_reset()
|
||||
{
|
||||
m_slot->m_program->install_ram(0xb800, 0xf7ff, m_ram);
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// VZ300 64K DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// laser_64k_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
laser_64k_device::laser_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, LASER_64K, "Laser/VZ 64k Memory", tag, owner, clock, "laser_64k", __FILE__),
|
||||
device_memexp_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser_64k_device::device_start()
|
||||
{
|
||||
m_ram.resize(64 * 1024);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void laser_64k_device::device_reset()
|
||||
{
|
||||
// fixed first bank
|
||||
m_slot->m_program->install_ram(0x8000, 0xbfff, m_ram);
|
||||
|
||||
// other banks
|
||||
m_slot->m_program->install_readwrite_bank(0xc000, 0xffff, tag());
|
||||
|
||||
membank(tag())->configure_entries(0, 4, m_ram, 0x4000);
|
||||
membank(tag())->set_entry(1);
|
||||
|
||||
// bank switch
|
||||
m_slot->m_io->install_write_handler(0x70, 0x7f, write8_delegate(FUNC(laser_64k_device::bankswitch_w), this));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( laser_64k_device::bankswitch_w )
|
||||
{
|
||||
membank(tag())->set_entry(data & 0x03);
|
||||
}
|
95
src/emu/bus/vtech/memexp/memory.h
Normal file
95
src/emu/bus/vtech/memexp/memory.h
Normal file
@ -0,0 +1,95 @@
|
||||
/***************************************************************************
|
||||
|
||||
VTech Laser/VZ Memory Expansions
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_MEMEXP_MEMORY__
|
||||
#define __VTECH_MEMEXP_MEMORY__
|
||||
|
||||
#include "emu.h"
|
||||
#include "memexp.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> laser110_16k_device
|
||||
|
||||
class laser110_16k_device : public device_t, public device_memexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
laser110_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
dynamic_array<UINT8> m_ram;
|
||||
};
|
||||
|
||||
// ======================> laser210_16k_device
|
||||
|
||||
class laser210_16k_device : public device_t, public device_memexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
laser210_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
dynamic_array<UINT8> m_ram;
|
||||
};
|
||||
|
||||
// ======================> laser310_16k_device
|
||||
|
||||
class laser310_16k_device : public device_t, public device_memexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
laser310_16k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
dynamic_array<UINT8> m_ram;
|
||||
};
|
||||
|
||||
// ======================> laser_64k_device
|
||||
|
||||
class laser_64k_device : public device_t, public device_memexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
laser_64k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_WRITE8_MEMBER( bankswitch_w );
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
dynamic_array<UINT8> m_ram;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type LASER110_16K;
|
||||
extern const device_type LASER210_16K;
|
||||
extern const device_type LASER310_16K;
|
||||
extern const device_type LASER_64K;
|
||||
|
||||
#endif // __VTECH_MEMEXP_MEMORY__
|
105
src/emu/bus/vtech/memexp/rs232.c
Normal file
105
src/emu/bus/vtech/memexp/rs232.c
Normal file
@ -0,0 +1,105 @@
|
||||
/***************************************************************************
|
||||
|
||||
Dick Smith VZ-200/300 RS-232 Cartridge
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "rs232.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type RS232_INTERFACE = &device_creator<rs232_interface_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( rs232 )
|
||||
ROM_REGION(0x800, "software", 0)
|
||||
ROM_LOAD("rs232_v15.ic2", 0x000, 0x800, CRC(6545260d) SHA1(4042f6f1e09e383f3c92f628c6187dc5f072fdb2))
|
||||
ROM_END
|
||||
|
||||
const rom_entry *rs232_interface_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( rs232 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( rs232 )
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
|
||||
MCFG_RS232_RXD_HANDLER(WRITELINE(rs232_interface_device, rs232_rx_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor rs232_interface_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( rs232 );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// wordpro_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
rs232_interface_device::rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, RS232_INTERFACE, "DSE VZ-200/300 RS-232 Interface", tag, owner, clock, "vz_rs232", __FILE__),
|
||||
device_memexp_interface(mconfig, *this),
|
||||
m_rs232(*this, "rs232"),
|
||||
m_rx(1)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void rs232_interface_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void rs232_interface_device::device_reset()
|
||||
{
|
||||
// program
|
||||
m_slot->m_program->install_rom(0x4000, 0x47ff, 0, 0x800, memregion("software")->base());
|
||||
|
||||
// data
|
||||
m_slot->m_program->install_read_handler(0x5000, 0x57ff, read8_delegate(FUNC(rs232_interface_device::receive_data_r), this));
|
||||
m_slot->m_program->install_write_handler(0x5800, 0x5fff, write8_delegate(FUNC(rs232_interface_device::transmit_data_w), this));
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// IMPLEMENTATION
|
||||
//**************************************************************************
|
||||
|
||||
WRITE_LINE_MEMBER( rs232_interface_device::rs232_rx_w )
|
||||
{
|
||||
m_rx = state;
|
||||
}
|
||||
|
||||
READ8_MEMBER( rs232_interface_device::receive_data_r )
|
||||
{
|
||||
return 0x7f | (m_rx << 7);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( rs232_interface_device::transmit_data_w )
|
||||
{
|
||||
m_rs232->write_txd(!BIT(data, 7));
|
||||
}
|
51
src/emu/bus/vtech/memexp/rs232.h
Normal file
51
src/emu/bus/vtech/memexp/rs232.h
Normal file
@ -0,0 +1,51 @@
|
||||
/***************************************************************************
|
||||
|
||||
Dick Smith VZ-200/300 RS-232 Cartridge
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_MEMEXP_RS232_H__
|
||||
#define __VTECH_MEMEXP_RS232_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "memexp.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> rs232_interface_device
|
||||
|
||||
class rs232_interface_device : public device_t, public device_memexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
rs232_interface_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( rs232_rx_w );
|
||||
DECLARE_READ8_MEMBER( receive_data_r );
|
||||
DECLARE_WRITE8_MEMBER( transmit_data_w );
|
||||
|
||||
protected:
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
private:
|
||||
required_device<rs232_port_device> m_rs232;
|
||||
|
||||
int m_rx;
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type RS232_INTERFACE;
|
||||
|
||||
#endif // __VTECH_MEMEXP_RS232_H__
|
66
src/emu/bus/vtech/memexp/wordpro.c
Normal file
66
src/emu/bus/vtech/memexp/wordpro.c
Normal file
@ -0,0 +1,66 @@
|
||||
/***************************************************************************
|
||||
|
||||
Dick Smith VZ-300 WordPro Cartridge
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "wordpro.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
const device_type WORDPRO = &device_creator<wordpro_device>;
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
ROM_START( wordpro )
|
||||
ROM_REGION(0x3000, "software", 0)
|
||||
ROM_LOAD("wordpro.u3", 0x0000, 0x1000, CRC(c37ea780) SHA1(03f56711e08d88e7b523c0ef9c2a5af83ee7ad05))
|
||||
ROM_LOAD("wordpro.u4", 0x1000, 0x1000, CRC(2e3a8c45) SHA1(a9d48d809f39a3478496a6d3ddd728bd0b4efc37))
|
||||
ROM_LOAD("wordpro.u5", 0x2000, 0x1000, CRC(2a336802) SHA1(b4de50f943243f18a2bfabef354b76d77178c189))
|
||||
ROM_END
|
||||
|
||||
const rom_entry *wordpro_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( wordpro );
|
||||
}
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// wordpro_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
wordpro_device::wordpro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, WORDPRO, "DSE VZ-300 WordPro", tag, owner, clock, "wordpro", __FILE__),
|
||||
device_memexp_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void wordpro_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_reset - device-specific reset
|
||||
//-------------------------------------------------
|
||||
|
||||
void wordpro_device::device_reset()
|
||||
{
|
||||
m_slot->m_program->install_rom(0x6000, 0x67ff, memregion("software")->base());
|
||||
m_slot->m_program->install_rom(0xd000, 0xffff, memregion("software")->base());
|
||||
}
|
40
src/emu/bus/vtech/memexp/wordpro.h
Normal file
40
src/emu/bus/vtech/memexp/wordpro.h
Normal file
@ -0,0 +1,40 @@
|
||||
/***************************************************************************
|
||||
|
||||
Dick Smith VZ-300 WordPro Cartridge
|
||||
|
||||
license: MAME, GPL-2.0+
|
||||
copyright-holders: Dirk Best
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __VTECH_MEMEXP_WORDPRO_H__
|
||||
#define __VTECH_MEMEXP_WORDPRO_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "memexp.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> wordpro_device
|
||||
|
||||
class wordpro_device : public device_t, public device_memexp_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wordpro_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
protected:
|
||||
virtual const rom_entry *device_rom_region() const;
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
};
|
||||
|
||||
// device type definition
|
||||
extern const device_type WORDPRO;
|
||||
|
||||
#endif // __VTECH_MEMEXP_WORDPRO_H__
|
@ -28,6 +28,10 @@ LEGACY_FLOPPY_OPTIONS_START( vtech1_only )
|
||||
vtech1_dsk_identify,
|
||||
vtech1_dsk_construct,
|
||||
NULL,
|
||||
NULL
|
||||
HEADS([1])
|
||||
TRACKS([40])
|
||||
SECTORS([16])
|
||||
SECTOR_LENGTH([154])
|
||||
FIRST_SECTOR_ID([0])
|
||||
)
|
||||
LEGACY_FLOPPY_OPTIONS_END0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1211,24 +1211,27 @@ rameses
|
||||
vz2000
|
||||
crvisio2
|
||||
manager
|
||||
|
||||
// Video Technology Laser Generation 1 machines
|
||||
laser110 // 1983 Laser 110
|
||||
las110de // 1983 Sanyo Laser 110 (Germany)
|
||||
laser200 // 1983 Laser 200 (color version of 110)
|
||||
// vz200de // 1983 VZ-200 (Germany)
|
||||
fellow // 1983 Salora Fellow (Finland)
|
||||
tx8000 // 1983 Texet TX-8000 (U.K.)
|
||||
laser210 // 1984 Laser 210 (200 with more memory)
|
||||
las210de // 1984 Sanyo Laser 210 (Germany)
|
||||
vz200 // 1984 Dick Smith Electronics VZ-200
|
||||
laser310 // 1984 Laser 310 (210 with diff. keyboard and RAM)
|
||||
laser200 // 1983 Laser 200
|
||||
vz200de // 1983 VZ-200 (Germany)
|
||||
fellow // 1983 Salora Fellow
|
||||
tx8000 // 1983 Texet TX-8000
|
||||
laser210 // 1984 Laser 210
|
||||
vz200 // 1984 Dick Smith Electronics VZ-200
|
||||
laser310 // 1984 Laser 310
|
||||
laser310h // 1984 Laser 310 with SHRG mod
|
||||
vz300 // 1984 Dick Smith Electronics VZ-300
|
||||
vz300 // 1984 Dick Smith Electronics VZ-300
|
||||
|
||||
// Video Technology Laser Generation 2 machines
|
||||
laser350 // 1984? Laser 350
|
||||
laser500 // 1984? Laser 500
|
||||
laser700 // 1984? Laser 700
|
||||
|
||||
socrates // 1988 Socrates Educational Video System (USA)
|
||||
socratfc // 1988 Socrates SAITOUT (French Canada)
|
||||
profweis // 1988 (Yeno) Proffesor Weiss-Alles (Germany)
|
||||
profweis // 1988 (Yeno) Professor Weiss-Alles (Germany)
|
||||
gl8008cx // 1999 Genius Leader 8008 CX (Germany)
|
||||
bs9009cx // 1999 BrainStation 9009 CXL (Germany)
|
||||
iq128_fr // 1997 Genius PC (France)
|
||||
|
@ -614,6 +614,8 @@ BUSES += VIC10
|
||||
BUSES += VIC20
|
||||
BUSES += VIDBRAIN
|
||||
BUSES += VIP
|
||||
BUSES += VTECH_IOEXP
|
||||
BUSES += VTECH_MEMEXP
|
||||
BUSES += WANGPC
|
||||
BUSES += X68K
|
||||
BUSES += Z88
|
||||
|
Loading…
Reference in New Issue
Block a user