summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/bus/vidbrain
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/bus/vidbrain')
-rw-r--r--src/emu/bus/vidbrain/exp.c260
-rw-r--r--src/emu/bus/vidbrain/exp.h185
-rw-r--r--src/emu/bus/vidbrain/money_minder.c79
-rw-r--r--src/emu/bus/vidbrain/money_minder.h49
-rw-r--r--src/emu/bus/vidbrain/std.c65
-rw-r--r--src/emu/bus/vidbrain/std.h48
-rw-r--r--src/emu/bus/vidbrain/timeshare.c78
-rw-r--r--src/emu/bus/vidbrain/timeshare.h49
8 files changed, 813 insertions, 0 deletions
diff --git a/src/emu/bus/vidbrain/exp.c b/src/emu/bus/vidbrain/exp.c
new file mode 100644
index 00000000000..e1259ba52d2
--- /dev/null
+++ b/src/emu/bus/vidbrain/exp.c
@@ -0,0 +1,260 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Expansion Port emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#include "exp.h"
+
+
+
+//**************************************************************************
+// MACROS/CONSTANTS
+//**************************************************************************
+
+#define LOG 0
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type VIDEOBRAIN_EXPANSION_SLOT = &device_creator<videobrain_expansion_slot_device>;
+
+
+
+//**************************************************************************
+// DEVICE VIDEOBRAIN_EXPANSION CARD INTERFACE
+//**************************************************************************
+
+//-------------------------------------------------
+// device_videobrain_expansion_card_interface - constructor
+//-------------------------------------------------
+
+device_videobrain_expansion_card_interface::device_videobrain_expansion_card_interface(const machine_config &mconfig, device_t &device)
+ : device_slot_card_interface(mconfig, device),
+ m_rom(NULL),
+ m_ram(NULL),
+ m_rom_mask(0),
+ m_ram_mask(0)
+{
+ m_slot = dynamic_cast<videobrain_expansion_slot_device *>(device.owner());
+}
+
+
+//-------------------------------------------------
+// ~device_videobrain_expansion_card_interface - destructor
+//-------------------------------------------------
+
+device_videobrain_expansion_card_interface::~device_videobrain_expansion_card_interface()
+{
+}
+
+
+//-------------------------------------------------
+// videobrain_roml_pointer - get low ROM pointer
+//-------------------------------------------------
+
+UINT8* device_videobrain_expansion_card_interface::videobrain_rom_pointer(running_machine &machine, size_t size)
+{
+ if (m_rom == NULL)
+ {
+ m_rom = auto_alloc_array(machine, UINT8, size);
+
+ m_rom_mask = size - 1;
+ }
+
+ return m_rom;
+}
+
+
+//-------------------------------------------------
+// videobrain_ram_pointer - get RAM pointer
+//-------------------------------------------------
+
+UINT8* device_videobrain_expansion_card_interface::videobrain_ram_pointer(running_machine &machine, size_t size)
+{
+ if (m_ram == NULL)
+ {
+ m_ram = auto_alloc_array(machine, UINT8, size);
+
+ m_ram_mask = size - 1;
+ }
+
+ return m_ram;
+}
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// videobrain_expansion_slot_device - constructor
+//-------------------------------------------------
+
+videobrain_expansion_slot_device::videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, VIDEOBRAIN_EXPANSION_SLOT, "VideoBrain expansion port", tag, owner, clock, "videobrain_expansion_slot", __FILE__),
+ device_slot_interface(mconfig, *this),
+ device_image_interface(mconfig, *this)
+{
+}
+
+
+//-------------------------------------------------
+// videobrain_expansion_slot_device - destructor
+//-------------------------------------------------
+
+videobrain_expansion_slot_device::~videobrain_expansion_slot_device()
+{
+}
+
+
+//-------------------------------------------------
+// device_config_complete - perform any
+// operations now that the configuration is
+// complete
+//-------------------------------------------------
+
+void videobrain_expansion_slot_device::device_config_complete()
+{
+ // inherit a copy of the static data
+ const videobrain_expansion_slot_interface *intf = reinterpret_cast<const videobrain_expansion_slot_interface *>(static_config());
+ if (intf != NULL)
+ {
+ *static_cast<videobrain_expansion_slot_interface *>(this) = *intf;
+ }
+
+ // or initialize to defaults if none provided
+ else
+ {
+ memset(&m_out_extres_cb, 0, sizeof(m_out_extres_cb));
+ }
+
+ // set brief and instance name
+ update_names();
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void videobrain_expansion_slot_device::device_start()
+{
+ m_cart = dynamic_cast<device_videobrain_expansion_card_interface *>(get_card_device());
+
+ // resolve callbacks
+ m_out_extres_func.resolve(m_out_extres_cb, *this);
+}
+
+
+//-------------------------------------------------
+// call_load -
+//-------------------------------------------------
+
+bool videobrain_expansion_slot_device::call_load()
+{
+ if (m_cart)
+ {
+ size_t size = 0;
+
+ if (software_entry() == NULL)
+ {
+ size = length();
+
+ fread(m_cart->videobrain_rom_pointer(machine(), size), size);
+ }
+ else
+ {
+ size = get_software_region_length("rom");
+ if (size) memcpy(m_cart->videobrain_rom_pointer(machine(), size), get_software_region("rom"), size);
+
+ size = get_software_region_length("ram");
+ if (size) memset(m_cart->videobrain_ram_pointer(machine(), size), 0, size);
+ }
+ }
+
+ return IMAGE_INIT_PASS;
+}
+
+
+//-------------------------------------------------
+// call_softlist_load -
+//-------------------------------------------------
+
+bool videobrain_expansion_slot_device::call_softlist_load(char *swlist, char *swname, rom_entry *start_entry)
+{
+ load_software_part_region(this, swlist, swname, start_entry);
+
+ return true;
+}
+
+
+//-------------------------------------------------
+// get_default_card_software -
+//-------------------------------------------------
+
+const char * videobrain_expansion_slot_device::get_default_card_software(const machine_config &config, emu_options &options)
+{
+ return software_get_default_slot(config, options, this, "standard");
+}
+
+
+//-------------------------------------------------
+// bo_r - cartridge data read
+//-------------------------------------------------
+
+UINT8 videobrain_expansion_slot_device::bo_r(address_space &space, offs_t offset, int cs1, int cs2)
+{
+ UINT8 data = 0;
+
+ if (m_cart != NULL)
+ {
+ data = m_cart->videobrain_bo_r(space, offset, cs1, cs2);
+ }
+
+ return data;
+}
+
+
+//-------------------------------------------------
+// bo_w - cartridge data write
+//-------------------------------------------------
+
+void videobrain_expansion_slot_device::bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2)
+{
+ if (m_cart != NULL)
+ {
+ m_cart->videobrain_bo_w(space, offset, data, cs1, cs2);
+ }
+}
+
+
+READ8_MEMBER( videobrain_expansion_slot_device::cs1_r ) { return bo_r(space, offset + 0x1000, 0, 1); }
+WRITE8_MEMBER( videobrain_expansion_slot_device::cs1_w ) { bo_w(space, offset + 0x1000, data, 0, 1); }
+READ8_MEMBER( videobrain_expansion_slot_device::cs2_r ) { return bo_r(space, offset + 0x1800, 1, 0); }
+WRITE8_MEMBER( videobrain_expansion_slot_device::cs2_w ) { bo_w(space, offset + 0x1800, data, 1, 0); }
+READ8_MEMBER( videobrain_expansion_slot_device::unmap_r ) { return bo_r(space, offset + 0x3000, 1, 0); }
+WRITE8_MEMBER( videobrain_expansion_slot_device::unmap_w ) { bo_w(space, offset + 0x3000, data, 1, 0); }
+
+
+WRITE_LINE_MEMBER( videobrain_expansion_slot_device::extres_w ) { m_out_extres_func(state); }
+
+
+//-------------------------------------------------
+// SLOT_INTERFACE_START( vidbrain_expansion_cards )
+//-------------------------------------------------
+
+SLOT_INTERFACE_START( vidbrain_expansion_cards )
+ SLOT_INTERFACE_INTERNAL("standard", VB_STD)
+ SLOT_INTERFACE_INTERNAL("moneyminder", VB_MONEY_MINDER)
+ SLOT_INTERFACE_INTERNAL("timeshare", VB_TIMESHARE)
+SLOT_INTERFACE_END
diff --git a/src/emu/bus/vidbrain/exp.h b/src/emu/bus/vidbrain/exp.h
new file mode 100644
index 00000000000..db856a5ad56
--- /dev/null
+++ b/src/emu/bus/vidbrain/exp.h
@@ -0,0 +1,185 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Expansion Port emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************
+
+ GND 1 2 BO2
+ BO1 3 4 BO0
+ BA0 5 6 BA1
+ BA2 7 8 BA3
+ BA4 9 10 BA5
+ BA6 11 12 BA7
+ +5V 13 14 BA8
+ BA9 15 16 _CS1
+ BA10 17 18 BO7
+ BO6 19 20 BO5
+ BO4 21 22 BO3
+ BA11 23 24 BA12
+ BRC 25 26 ?
+ EXTRES 27 28 _CS2
+ ? 29 30 UV202/35
+ HBLANK 31 32 UV201/5
+ UV201/2 33 34 UV201/4
+ UV201/3 35 36 BISTROBE
+ UV202/1 37 38 BA13
+ UV202/18 39 40 ?
+ R/W 41 42 +5V
+ GND 43 44 GND
+ GND 45 46 N/C
+ ? 47 48 N/C
+ N/C 49 50 N/C
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __VIDEOBRAIN_EXPANSION_SLOT__
+#define __VIDEOBRAIN_EXPANSION_SLOT__
+
+#include "emu.h"
+
+
+
+//**************************************************************************
+// CONSTANTS
+//**************************************************************************
+
+#define VIDEOBRAIN_EXPANSION_SLOT_TAG "exp"
+
+
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define VIDEOBRAIN_EXPANSION_INTERFACE(_name) \
+ const videobrain_expansion_slot_interface (_name) =
+
+
+#define MCFG_VIDEOBRAIN_EXPANSION_SLOT_ADD(_tag, _config, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, VIDEOBRAIN_EXPANSION_SLOT, 0) \
+ MCFG_DEVICE_CONFIG(_config) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> videobrain_expansion_slot_interface
+
+struct videobrain_expansion_slot_interface
+{
+ devcb_write_line m_out_extres_cb;
+};
+
+
+// ======================> videobrain_expansion_slot_device
+
+class device_videobrain_expansion_card_interface;
+
+class videobrain_expansion_slot_device : public device_t,
+ public videobrain_expansion_slot_interface,
+ public device_slot_interface,
+ public device_image_interface
+{
+public:
+ // construction/destruction
+ videobrain_expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ virtual ~videobrain_expansion_slot_device();
+
+ // computer interface
+ UINT8 bo_r(address_space &space, offs_t offset, int cs1, int cs2);
+ void bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2);
+
+ DECLARE_READ8_MEMBER( cs1_r );
+ DECLARE_WRITE8_MEMBER( cs1_w );
+ DECLARE_READ8_MEMBER( cs2_r );
+ DECLARE_WRITE8_MEMBER( cs2_w );
+ DECLARE_READ8_MEMBER( unmap_r );
+ DECLARE_WRITE8_MEMBER( unmap_w );
+
+ // cartridge interface
+ DECLARE_WRITE_LINE_MEMBER( extres_w );
+
+protected:
+ // device-level overrides
+ virtual void device_config_complete();
+ virtual void device_start();
+
+ // image-level overrides
+ virtual bool call_load();
+ virtual bool call_softlist_load(char *swlist, char *swname, rom_entry *start_entry);
+
+ virtual iodevice_t image_type() const { return IO_CARTSLOT; }
+
+ virtual bool is_readable() const { return 1; }
+ virtual bool is_writeable() const { return 0; }
+ virtual bool is_creatable() const { return 0; }
+ virtual bool must_be_loaded() const { return 0; }
+ virtual bool is_reset_on_load() const { return 1; }
+ virtual const char *image_interface() const { return "vidbrain_cart"; }
+ virtual const char *file_extensions() const { return "bin"; }
+ virtual const option_guide *create_option_guide() const { return NULL; }
+
+ // slot interface overrides
+ virtual const char * get_default_card_software(const machine_config &config, emu_options &options);
+
+ devcb_resolved_write_line m_out_extres_func;
+
+ device_videobrain_expansion_card_interface *m_cart;
+};
+
+
+// ======================> device_videobrain_expansion_card_interface
+
+class device_videobrain_expansion_card_interface : public device_slot_card_interface
+{
+ friend class videobrain_expansion_slot_device;
+
+public:
+ // construction/destruction
+ device_videobrain_expansion_card_interface(const machine_config &mconfig, device_t &device);
+ virtual ~device_videobrain_expansion_card_interface();
+
+protected:
+ // initialization
+ virtual UINT8* videobrain_rom_pointer(running_machine &machine, size_t size);
+ virtual UINT8* videobrain_ram_pointer(running_machine &machine, size_t size);
+
+ // runtime
+ virtual UINT8 videobrain_bo_r(address_space &space, offs_t offset, int cs1, int cs2) { return 0; };
+ virtual void videobrain_bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2) { };
+ virtual void videobrain_extres_w() { };
+
+ videobrain_expansion_slot_device *m_slot;
+
+ UINT8 *m_rom;
+ UINT8 *m_ram;
+
+ size_t m_rom_mask;
+ size_t m_ram_mask;
+};
+
+
+// device type definition
+extern const device_type VIDEOBRAIN_EXPANSION_SLOT;
+
+
+// slot devices
+#include "std.h"
+#include "money_minder.h"
+#include "timeshare.h"
+
+SLOT_INTERFACE_EXTERN( vidbrain_expansion_cards );
+
+
+
+#endif
diff --git a/src/emu/bus/vidbrain/money_minder.c b/src/emu/bus/vidbrain/money_minder.c
new file mode 100644
index 00000000000..98df3830963
--- /dev/null
+++ b/src/emu/bus/vidbrain/money_minder.c
@@ -0,0 +1,79 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Money Minder cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#include "money_minder.h"
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type VB_MONEY_MINDER = &device_creator<videobrain_money_minder_cartridge_device>;
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// videobrain_money_minder_cartridge_device - constructor
+//-------------------------------------------------
+
+videobrain_money_minder_cartridge_device::videobrain_money_minder_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, VB_MONEY_MINDER, "VideoBrain Money Minder cartridge", tag, owner, clock, "vb_money_minder", __FILE__),
+ device_videobrain_expansion_card_interface(mconfig, *this)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void videobrain_money_minder_cartridge_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// videobrain_cd_r - cartridge data read
+//-------------------------------------------------
+
+UINT8 videobrain_money_minder_cartridge_device::videobrain_bo_r(address_space &space, offs_t offset, int cs1, int cs2)
+{
+ UINT8 data = 0;
+
+ if (!cs1 || !cs2)
+ {
+ data = m_rom[offset & m_rom_mask];
+ }
+ else if (offset >= 0x3800)
+ {
+ data = m_ram[offset & m_ram_mask];
+ }
+
+ return data;
+}
+
+
+//-------------------------------------------------
+// videobrain_bo_w - cartridge data write
+//-------------------------------------------------
+
+void videobrain_money_minder_cartridge_device::videobrain_bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2)
+{
+ if (offset >= 0x3800)
+ {
+ m_ram[offset & m_ram_mask] = data;
+ }
+}
diff --git a/src/emu/bus/vidbrain/money_minder.h b/src/emu/bus/vidbrain/money_minder.h
new file mode 100644
index 00000000000..20bdaf1f1e5
--- /dev/null
+++ b/src/emu/bus/vidbrain/money_minder.h
@@ -0,0 +1,49 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Money Minder cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __VIDEOBRAIN_MONEY_MINDER_CARTRIDGE__
+#define __VIDEOBRAIN_MONEY_MINDER_CARTRIDGE__
+
+#include "emu.h"
+#include "exp.h"
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> videobrain_money_minder_cartridge_device
+
+class videobrain_money_minder_cartridge_device : public device_t,
+ public device_videobrain_expansion_card_interface
+{
+public:
+ // construction/destruction
+ videobrain_money_minder_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+
+ // device_videobrain_expansion_card_interface overrides
+ virtual UINT8 videobrain_bo_r(address_space &space, offs_t offset, int cs1, int cs2);
+ virtual void videobrain_bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2);
+};
+
+
+// device type definition
+extern const device_type VB_MONEY_MINDER;
+
+
+#endif
diff --git a/src/emu/bus/vidbrain/std.c b/src/emu/bus/vidbrain/std.c
new file mode 100644
index 00000000000..cbfbf6e20d3
--- /dev/null
+++ b/src/emu/bus/vidbrain/std.c
@@ -0,0 +1,65 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Standard 2K/4K cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#include "std.h"
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type VB_STD = &device_creator<videobrain_standard_cartridge_device>;
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// videobrain_standard_cartridge_device - constructor
+//-------------------------------------------------
+
+videobrain_standard_cartridge_device::videobrain_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, VB_STD, "VideoBrain standard cartridge", tag, owner, clock, "vb_std", __FILE__),
+ device_videobrain_expansion_card_interface(mconfig, *this)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void videobrain_standard_cartridge_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// videobrain_bo_r - cartridge data read
+//-------------------------------------------------
+
+UINT8 videobrain_standard_cartridge_device::videobrain_bo_r(address_space &space, offs_t offset, int cs1, int cs2)
+{
+ UINT8 data = 0;
+
+ if (!cs1)
+ {
+ data = m_rom[offset & m_rom_mask];
+ }
+ else if (!cs2)
+ {
+ data = m_rom[offset & m_rom_mask];
+ }
+ return data;
+}
diff --git a/src/emu/bus/vidbrain/std.h b/src/emu/bus/vidbrain/std.h
new file mode 100644
index 00000000000..a0baea9e3a7
--- /dev/null
+++ b/src/emu/bus/vidbrain/std.h
@@ -0,0 +1,48 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Standard 2K/4K cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __VIDEOBRAIN_STANDARD_CARTRIDGE__
+#define __VIDEOBRAIN_STANDARD_CARTRIDGE__
+
+#include "emu.h"
+#include "exp.h"
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> videobrain_standard_cartridge_device
+
+class videobrain_standard_cartridge_device : public device_t,
+ public device_videobrain_expansion_card_interface
+{
+public:
+ // construction/destruction
+ videobrain_standard_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+
+ // device_videobrain_expansion_card_interface overrides
+ virtual UINT8 videobrain_bo_r(address_space &space, offs_t offset, int cs1, int cs2);
+};
+
+
+// device type definition
+extern const device_type VB_STD;
+
+
+#endif
diff --git a/src/emu/bus/vidbrain/timeshare.c b/src/emu/bus/vidbrain/timeshare.c
new file mode 100644
index 00000000000..ccb3f8781ad
--- /dev/null
+++ b/src/emu/bus/vidbrain/timeshare.c
@@ -0,0 +1,78 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Timeshare cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#include "timeshare.h"
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type VB_TIMESHARE = &device_creator<videobrain_timeshare_cartridge_device>;
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// videobrain_timeshare_cartridge_device - constructor
+//-------------------------------------------------
+
+videobrain_timeshare_cartridge_device::videobrain_timeshare_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, VB_TIMESHARE, "VideoBrain Timeshare cartridge", tag, owner, clock, "vb_timeshare", __FILE__),
+ device_videobrain_expansion_card_interface(mconfig, *this)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void videobrain_timeshare_cartridge_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// videobrain_bo_r - cartridge data read
+//-------------------------------------------------
+
+UINT8 videobrain_timeshare_cartridge_device::videobrain_bo_r(address_space &space, offs_t offset, int cs1, int cs2)
+{
+ UINT8 data = 0;
+
+ if (!cs1)
+ {
+ data = m_rom[offset & m_rom_mask];
+ }
+ else if (!cs2)
+ {
+ data = m_ram[offset & m_ram_mask];
+ }
+ return data;
+}
+
+
+//-------------------------------------------------
+// videobrain_bo_w - cartridge data write
+//-------------------------------------------------
+
+void videobrain_timeshare_cartridge_device::videobrain_bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2)
+{
+ if (!cs2)
+ {
+ m_ram[offset & m_ram_mask] = data;
+ }
+}
diff --git a/src/emu/bus/vidbrain/timeshare.h b/src/emu/bus/vidbrain/timeshare.h
new file mode 100644
index 00000000000..d4c10b4821e
--- /dev/null
+++ b/src/emu/bus/vidbrain/timeshare.h
@@ -0,0 +1,49 @@
+// license:BSD-3-Clause
+// copyright-holders:Curt Coder
+/**********************************************************************
+
+ VideoBrain Timeshare cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __VIDEOBRAIN_TIMESHARE_CARTRIDGE__
+#define __VIDEOBRAIN_TIMESHARE_CARTRIDGE__
+
+#include "emu.h"
+#include "exp.h"
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> videobrain_timeshare_cartridge_device
+
+class videobrain_timeshare_cartridge_device : public device_t,
+ public device_videobrain_expansion_card_interface
+{
+public:
+ // construction/destruction
+ videobrain_timeshare_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+
+ // device_videobrain_expansion_card_interface overrides
+ virtual UINT8 videobrain_bo_r(address_space &space, offs_t offset, int cs1, int cs2);
+ virtual void videobrain_bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2);
+};
+
+
+// device type definition
+extern const device_type VB_TIMESHARE;
+
+
+#endif