summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/psx/parallel.h
diff options
context:
space:
mode:
author David Haywood <hazemamewip@hotmail.com>2018-01-27 15:17:37 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2018-01-27 10:17:37 -0500
commitff61c2c50d4873a2fe0bea9a27a41e0be3d983e5 (patch)
treea2aca740abb6ba8637a0a53ca258271e40c20963 /src/devices/bus/psx/parallel.h
parent9560cc97d903ce5abad7030ff48f55319b029e18 (diff)
framework for adding 'gamebooster' (need to figure out how it actually works / maps tho) (#3134)
* fix/tidy tvboy driver (nw) * missed file (nw) * framework for adding 'gamebooster' (need to figure out how it actually works / maps tho) (nw) (code based on zx spectrum expansion port code) * (nw) * lost a line (nw) * allow it to run (nw) * continued work (nw) * mame64 psj -parallel gamebooster -cart tetris now works * rm outdated (nw) * remove unneeded code (nw) * limit accesses, log unexpected ones, might have custom banking (nw) * write bytes in an order that keeps the gb code happier , sml boots (nw)
Diffstat (limited to 'src/devices/bus/psx/parallel.h')
-rw-r--r--src/devices/bus/psx/parallel.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/devices/bus/psx/parallel.h b/src/devices/bus/psx/parallel.h
new file mode 100644
index 00000000000..4ef05c52233
--- /dev/null
+++ b/src/devices/bus/psx/parallel.h
@@ -0,0 +1,74 @@
+// license:BSD-3-Clause
+// copyright-holders:David Haywood
+
+#ifndef MAME_BUS_PSX_PARALLEL_H
+#define MAME_BUS_PSX_PARALLEL_H
+
+#pragma once
+
+//**************************************************************************
+// INTERFACE CONFIGURATION MACROS
+//**************************************************************************
+
+#define MCFG_PSX_PARALLEL_SLOT_ADD(_tag, _slot_intf, _def_slot) \
+ MCFG_DEVICE_ADD(_tag, PSX_PARALLEL_SLOT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> psx_parallel_slot_device
+
+class psx_parallel_interface;
+
+class psx_parallel_slot_device : public device_t, public device_slot_interface
+{
+public:
+ // construction/destruction
+ psx_parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ virtual ~psx_parallel_slot_device();
+
+ DECLARE_READ16_MEMBER(exp_r);
+ DECLARE_WRITE16_MEMBER(exp_w);
+
+ const bool hascard() const
+ {
+ return bool(m_card);
+ };
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+ virtual void device_reset() override;
+
+ psx_parallel_interface *m_card;
+
+private:
+};
+
+
+// ======================> psx_parallel_interface
+
+class psx_parallel_interface : public device_slot_card_interface
+{
+public:
+ // construction/destruction
+ virtual ~psx_parallel_interface();
+
+ // reading and writing
+ virtual DECLARE_READ16_MEMBER(exp_r) { return 0xff; }
+ virtual DECLARE_WRITE16_MEMBER(exp_w) { }
+
+protected:
+ psx_parallel_interface(const machine_config &mconfig, device_t &device);
+};
+
+
+// device type definition
+DECLARE_DEVICE_TYPE(PSX_PARALLEL_SLOT, psx_parallel_slot_device)
+
+SLOT_INTERFACE_EXTERN( psx_parallel_devices );
+
+
+#endif // MAME_BUS_PSX_PARALLEL_H