summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99/internal/992board.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/ti99/internal/992board.h')
-rw-r--r--src/devices/bus/ti99/internal/992board.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/devices/bus/ti99/internal/992board.h b/src/devices/bus/ti99/internal/992board.h
index 75849ce2aea..83f42035839 100644
--- a/src/devices/bus/ti99/internal/992board.h
+++ b/src/devices/bus/ti99/internal/992board.h
@@ -21,6 +21,7 @@
#include "screen.h"
#include "bus/hexbus/hexbus.h"
#include "imagedev/cassette.h"
+#include "machine/ram.h"
#define TI992_CASSETTE "cassette"
#define TI992_VDC_TAG "vdc"
@@ -149,11 +150,87 @@ public:
io992_32_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
};
+/********************************************************************
+
+ Expansion port
+ This is modeled after the ioport connector of the TI-99/4A
+
+ However, since there are basically no expansion cards available,
+ and only the memory expansion was described in the specs, we
+ only include the necessary connections.
+
+********************************************************************/
+#define TI992_EXPPORT_TAG "expport"
+
+class ti992_expport_attached_device : public device_t
+{
+public:
+ ti992_expport_attached_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, type, tag, owner, clock)
+ { }
+
+ // Methods called from the console
+ virtual void readz(offs_t offset, uint8_t *value) { }
+ virtual void write(offs_t offset, uint8_t data) { }
+};
+
+class ti992_expport_device : public device_t, public device_slot_interface
+{
+ friend class expport_attached_device;
+
+public:
+ template <typename U>
+ ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, U &&opts, const char *dflt)
+ : ti992_expport_device(mconfig, tag, owner, clock)
+ {
+ option_reset();
+ opts(*this);
+ set_default_option(dflt);
+ set_fixed(false);
+ }
+
+ ti992_expport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ // Methods called from the console
+ // More methods should be added, once we can find further 99/2 cartridges
+ void readz(offs_t offset, uint8_t *value);
+ void write(offs_t offset, uint8_t data);
+
+protected:
+ void device_start() override { };
+ void device_config_complete() override;
+
+private:
+ ti992_expport_attached_device* m_connected;
+};
+
+// RAM expansion
+
+class ti992_expram_device : public ti992_expport_attached_device
+{
+public:
+ ti992_expram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ void readz(offs_t offset, uint8_t *value) override;
+ void write(offs_t offset, uint8_t data) override;
+
+private:
+ void device_start() override {};
+ void device_add_mconfig(machine_config &config) override;
+ required_device<ram_device> m_ram;
+};
+
+
} } } // end namespace bus::ti99::internal
+DECLARE_DEVICE_TYPE_NS(TI992_EXPPORT, bus::ti99::internal, ti992_expport_device)
+
+void ti992_expport_options(device_slot_interface &device);
+
DECLARE_DEVICE_TYPE_NS(VIDEO99224, bus::ti99::internal, video992_24_device)
DECLARE_DEVICE_TYPE_NS(VIDEO99232, bus::ti99::internal, video992_32_device)
DECLARE_DEVICE_TYPE_NS(IO99224, bus::ti99::internal, io992_24_device)
DECLARE_DEVICE_TYPE_NS(IO99232, bus::ti99::internal, io992_32_device)
+DECLARE_DEVICE_TYPE_NS(TI992_RAM32K, bus::ti99::internal, ti992_expram_device)
+
#endif // MAME_BUS_TI99_INTERNAL_992BOARD_H