summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/iq151/rom.h
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-09-13 08:41:44 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-09-13 08:41:44 +0200
commitf88cefad27a1737c76e09d99c9fb43e173506081 (patch)
tree2d8167d03579c46e226471747eb4407bd00ed6fa /src/devices/bus/iq151/rom.h
parente92ac9e0fa8e99869894bea00589bbb526be30aa (diff)
Move all devices into separate part of src tree (nw)
Diffstat (limited to 'src/devices/bus/iq151/rom.h')
-rw-r--r--src/devices/bus/iq151/rom.h130
1 files changed, 130 insertions, 0 deletions
diff --git a/src/devices/bus/iq151/rom.h b/src/devices/bus/iq151/rom.h
new file mode 100644
index 00000000000..da1f72bcec4
--- /dev/null
+++ b/src/devices/bus/iq151/rom.h
@@ -0,0 +1,130 @@
+// license:BSD-3-Clause
+// copyright-holders:Sandro Ronco
+#pragma once
+
+#ifndef __IQ151_ROM_H__
+#define __IQ151_ROM_H__
+
+#include "emu.h"
+#include "iq151.h"
+#include "machine/i8255.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> iq151_rom_device
+
+class iq151_rom_device :
+ public device_t,
+ public device_iq151cart_interface
+{
+public:
+ // construction/destruction
+ iq151_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
+
+ // optional information overrides
+ virtual const rom_entry *device_rom_region() const;
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+
+ // iq151cart_interface overrides
+ virtual UINT8* get_cart_base();
+
+ UINT8 * m_rom;
+};
+
+
+// ======================> iq151_basic6_device
+
+class iq151_basic6_device :
+ public iq151_rom_device
+{
+public:
+ // construction/destruction
+ iq151_basic6_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // iq151cart_interface overrides
+ virtual void read(offs_t offset, UINT8 &data);
+};
+
+// ======================> iq151_basicg_device
+
+class iq151_basicg_device :
+ public iq151_rom_device
+{
+public:
+ // construction/destruction
+ iq151_basicg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // iq151cart_interface overrides
+ virtual void read(offs_t offset, UINT8 &data);
+};
+
+
+// ======================> iq151_amos1_device
+
+class iq151_amos1_device :
+ public iq151_rom_device
+{
+public:
+ // construction/destruction
+ iq151_amos1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // iq151cart_interface overrides
+ virtual void read(offs_t offset, UINT8 &data);
+ virtual void io_write(offs_t offset, UINT8 data);
+
+ bool m_active;
+};
+
+
+// ======================> iq151_amos2_device
+
+class iq151_amos2_device :
+ public iq151_rom_device
+{
+public:
+ // construction/destruction
+ iq151_amos2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // iq151cart_interface overrides
+ virtual void read(offs_t offset, UINT8 &data);
+ virtual void io_write(offs_t offset, UINT8 data);
+
+ bool m_active;
+};
+
+
+// ======================> iq151_amos3_device
+
+class iq151_amos3_device :
+ public iq151_rom_device
+{
+public:
+ // construction/destruction
+ iq151_amos3_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // iq151cart_interface overrides
+ virtual void read(offs_t offset, UINT8 &data);
+ virtual void io_write(offs_t offset, UINT8 data);
+
+ bool m_active;
+};
+
+
+// device type definition
+extern const device_type IQ151_BASIC6;
+extern const device_type IQ151_BASICG;
+extern const device_type IQ151_AMOS1;
+extern const device_type IQ151_AMOS2;
+extern const device_type IQ151_AMOS3;
+
+#endif /* __IQ151_ROM_H__ */