summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/coco/cococart.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/coco/cococart.h')
-rw-r--r--src/devices/bus/coco/cococart.h79
1 files changed, 73 insertions, 6 deletions
diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h
index 1d6049119e7..03e3ad35a21 100644
--- a/src/devices/bus/coco/cococart.h
+++ b/src/devices/bus/coco/cococart.h
@@ -15,6 +15,23 @@
#include "softlist_dev.h"
+// The following are modules included by the various CoCo cartridge
+// devices. For some reason, the build system will not necessarily
+// identify them as dependencies. Adding these #include's here seems
+// to rectify the problem
+#include "cpu/tms7000/tms7000.h"
+#include "machine/mos6551.h"
+#include "machine/6850acia.h"
+#include "machine/msm6242.h"
+#include "machine/ds1315.h"
+#include "machine/wd_fdc.h"
+#include "sound/ay8910.h"
+#include "sound/sp0256.h"
+#include "sound/sn76496.h"
+#include "formats/dmk_dsk.h"
+#include "formats/jvc_dsk.h"
+#include "formats/vdk_dsk.h"
+
/***************************************************************************
TYPE DEFINITIONS
@@ -88,12 +105,13 @@ public:
// slot interface overrides
virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override;
- // reading and writing to $FF40-$FF7F
- DECLARE_READ8_MEMBER(read);
- DECLARE_WRITE8_MEMBER(write);
+ // reading and writing to $FF40-$FF5F
+ DECLARE_READ8_MEMBER(scs_read);
+ DECLARE_WRITE8_MEMBER(scs_write);
// manipulation of cartridge lines
void set_line_value(line line, line_value value);
+ void set_line_delay(line line, int cycles);
line_value get_line_value(line line) const;
// hack to support twiddling the Q line
@@ -102,7 +120,7 @@ public:
// cart base
uint8_t* get_cart_base();
void set_cart_base_update(cococart_base_update_delegate update);
-
+
private:
// TIMER_POOL: Must be power of two
static constexpr int TIMER_POOL = 2;
@@ -148,6 +166,17 @@ private:
extern const device_type COCOCART_SLOT;
DECLARE_DEVICE_TYPE(COCOCART_SLOT, cococart_slot_device)
+
+// ======================> device_cococart_host_interface
+
+// this is implemented by the CoCo root device itself and the Multi-Pak interface
+class device_cococart_host_interface
+{
+public:
+ virtual address_space &cartridge_space() = 0;
+};
+
+
// ======================> device_cococart_interface
class device_cococart_interface : public device_slot_card_interface
@@ -156,8 +185,8 @@ public:
// construction/destruction
virtual ~device_cococart_interface();
- virtual DECLARE_READ8_MEMBER(read);
- virtual DECLARE_WRITE8_MEMBER(write);
+ virtual DECLARE_READ8_MEMBER(scs_read);
+ virtual DECLARE_WRITE8_MEMBER(scs_write);
virtual void set_sound_enable(bool sound_enable);
virtual uint8_t* get_cart_base();
@@ -168,10 +197,22 @@ protected:
void cart_base_changed(void);
+ // CoCo cartridges can read directly from the address bus. This is used by a number of
+ // cartridges (e.g. - Orch-90, Multi-Pak interface) for their control registers, independently
+ // of the SCS or CTS lines
+ address_space &cartridge_space();
+ void install_read_handler(uint16_t addrstart, uint16_t addrend, read8_delegate rhandler);
+ void install_write_handler(uint16_t addrstart, uint16_t addrend, write8_delegate whandler);
+ void install_readwrite_handler(uint16_t addrstart, uint16_t addrend, read8_delegate rhandler, write8_delegate whandler);
+
+ // setting line values
+ void set_line_value(cococart_slot_device::line line, cococart_slot_device::line_value value);
+
private:
cococart_base_update_delegate m_update;
};
+
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
@@ -183,4 +224,30 @@ private:
#define MCFG_COCO_CARTRIDGE_REMOVE(_tag) \
MCFG_DEVICE_REMOVE(_tag)
+
+/***************************************************************************
+ COCO CARTRIDGE DEVICES
+***************************************************************************/
+
+// device type definitions - CoCo FDC
+extern const device_type COCO_FDC;
+extern const device_type COCO_FDC_V11;
+extern const device_type COCO3_HDB1;
+extern const device_type CP400_FDC;
+
+// device type definitions - Dragon FDC
+extern const device_type DRAGON_FDC;
+extern const device_type SDTANDY_FDC;
+
+// device type definitions - other
+extern const device_type COCO_ORCH90;
+extern const device_type COCO_MULTIPAK;
+extern const device_type COCO_RS232;
+extern const device_type COCO_DCMODEM;
+extern const device_type COCO_SSC;
+extern const device_type COCO_PAK;
+extern const device_type COCO_PAK_BANKED;
+extern const device_type COCO_PAK_GMC;
+extern const device_type COCO_T4426;
+
#endif // MAME_BUS_COCO_COCOCART_H