summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99x/datamux.h
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2016-03-31 23:55:50 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2016-03-31 23:55:50 +0200
commit13fce89d593e6cfc05c26b45f7f8658f4e10678a (patch)
treecb93de741a7cd8202eba5afccd7954462f851890 /src/devices/bus/ti99x/datamux.h
parent35eab357780107906b4d36c6f7cf1e27a9a7343e (diff)
ti99_8: Chipset low-level emulation; ti99_4x: using new GROMs
Diffstat (limited to 'src/devices/bus/ti99x/datamux.h')
-rw-r--r--src/devices/bus/ti99x/datamux.h98
1 files changed, 38 insertions, 60 deletions
diff --git a/src/devices/bus/ti99x/datamux.h b/src/devices/bus/ti99x/datamux.h
index 604dfb2e62f..eaad45b7238 100644
--- a/src/devices/bus/ti99x/datamux.h
+++ b/src/devices/bus/ti99x/datamux.h
@@ -15,54 +15,14 @@
#define __DMUX__
#include "ti99defs.h"
+#include "videowrp.h"
+#include "machine/tmc0430.h"
+#include "gromport.h"
+#include "bus/ti99_peb/peribox.h"
extern const device_type DATAMUX;
/*
- Device that is attached to this datamux.
- The configuration setting is used for certain configurations
- where devices may only be used if others are turned off. In particular,
- if the HGSPL expansion card is used, the GROMs in the console must be
- removed.
-*/
-struct dmux_device_list_entry
-{
- const char *name; // Name of the device (used for looking up the device)
- UINT16 select; // State of the address line bits when addressing this device
- UINT16 address_mask; // Bits of the address bus used to address this device
- UINT16 write_select; // Bits set when doing write accesses to this device (ffff = write-only)
- const char *setting; // configuration switch that may have an effect for the presence of this device
- UINT8 set; // bits that must be set for this switch so that this device is present
- UINT8 unset; // bits that must be reset for this switch so that this device is present
-};
-
-#define DMUX_CONFIG(name) \
- const datamux_config(name) =
-
-struct datamux_config
-{
- const dmux_device_list_entry *devlist;
-};
-
-/*
- Device list of this datamux.
-*/
-class attached_device
-{
- friend class simple_list<attached_device>;
- friend class ti99_datamux_device;
-
-public:
- attached_device(device_t *busdevice, const dmux_device_list_entry &entry)
- : m_next(nullptr), m_device(busdevice), m_config(&entry) { };
-
-private:
- attached_device *m_next;
- device_t *m_device; // the actual device
- const dmux_device_list_entry *m_config;
-};
-
-/*
Main class
*/
class ti99_datamux_device : public device_t
@@ -77,6 +37,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( dbin_in );
DECLARE_WRITE_LINE_MEMBER( ready_line );
+ DECLARE_WRITE_LINE_MEMBER( gromclk_in );
+
template<class _Object> static devcb_base &static_set_ready_callback(device_t &device, _Object object)
{
return downcast<ti99_datamux_device &>(device).m_ready.set_callback(object);
@@ -87,9 +49,22 @@ protected:
void device_start() override;
void device_stop() override;
void device_reset() override;
+ void device_config_complete() override;
ioport_constructor device_input_ports() const override;
private:
+ // Link to the video processor
+ bus8z_device* m_video;
+
+ // Link to the sound processor
+ ti_sound_sn94624_device* m_sound;
+
+ // Link to the peripheral expansion box
+ peribox_device* m_peb;
+
+ // Link to the cartridge port (aka GROM port)
+ gromport_device* m_gromport;
+
// Keeps the address space pointer
address_space* m_spacep;
@@ -112,21 +87,18 @@ private:
// Ready line to the CPU
devcb_write_line m_ready;
+ // Address latch (emu). In reality, the address bus remains constant.
+ UINT16 m_addr_buf;
+
+ // DBIN line
+ line_state m_dbin;
+
// Own ready state.
line_state m_muxready;
// Ready state. Needed to control wait state generation via inbound READY
line_state m_sysready;
- /* Address latch (emu). In reality, the address bus remains constant. */
- UINT16 m_addr_buf;
-
- /* Stores the state of the DBIN line. */
- bool m_read_mode;
-
- /* All devices that are attached to the 8-bit bus. */
- simple_list<attached_device> m_devices;
-
/* Latch which stores the first (odd) byte */
UINT8 m_latch;
@@ -136,22 +108,28 @@ private:
/* Memory expansion (internal, 16 bit). */
std::unique_ptr<UINT16[]> m_ram16b;
+ // Console RAM
+ std::unique_ptr<UINT16[]> m_padram;
+
+ // Console ROM
+ UINT16* m_consolerom;
+
+ // Console GROMs
+ tmc0430_device* m_grom[3];
+
/* Use the memory expansion? */
bool m_use32k;
/* Memory base for piggy-back 32K expansion. If 0, expansion is not used. */
UINT16 m_base32k;
- /* Reference to the CPU; avoid lookups. */
- device_t *m_cpu;
+ // Console GROMs are available (the HSGPL expects them to be removed)
+ bool m_console_groms_present;
};
/******************************************************************************/
-#define MCFG_DMUX_ADD(_tag, _devices) \
- MCFG_DEVICE_ADD(_tag, DATAMUX, 0) \
- MCFG_DEVICE_CONFIG( _devices )
-#endif
-
#define MCFG_DMUX_READY_HANDLER( _intcallb ) \
devcb = &ti99_datamux_device::static_set_ready_callback( *device, DEVCB_##_intcallb );
+
+#endif