summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/z88_rom.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/machine/z88_rom.h')
-rw-r--r--src/mess/machine/z88_rom.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/mess/machine/z88_rom.h b/src/mess/machine/z88_rom.h
new file mode 100644
index 00000000000..7eb0b51b179
--- /dev/null
+++ b/src/mess/machine/z88_rom.h
@@ -0,0 +1,75 @@
+#pragma once
+
+#ifndef __Z88_ROM_H__
+#define __Z88_ROM_H__
+
+#include "emu.h"
+#include "machine/z88cart.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> z88_32k_rom_device
+
+class z88_32k_rom_device : public device_t,
+ public device_z88cart_interface
+{
+public:
+ // construction/destruction
+ z88_32k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ z88_32k_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_start();
+ virtual void device_config_complete() { m_shortname = "z88_32k_rom"; }
+
+ // z88cart_interface overrides
+ virtual DECLARE_READ8_MEMBER(read);
+ virtual UINT8* get_cart_base();
+ virtual UINT32 get_cart_size() { return 0x8000; }
+
+protected:
+ // internal state
+ UINT8 * m_rom;
+};
+
+// ======================> z88_128k_rom_device
+
+class z88_128k_rom_device : public z88_32k_rom_device
+{
+public:
+ // construction/destruction
+ z88_128k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_config_complete() { m_shortname = "z88_128k_rom"; }
+
+ // z88cart_interface overrides
+ virtual UINT32 get_cart_size() { return 0x20000; }
+};
+
+// ======================> z88_256k_rom_device
+
+class z88_256k_rom_device : public z88_32k_rom_device
+{
+public:
+ // construction/destruction
+ z88_256k_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_config_complete() { m_shortname = "z88_256k_rom"; }
+
+ // z88cart_interface overrides
+ virtual UINT32 get_cart_size() { return 0x200000; }
+};
+
+// device type definition
+extern const device_type Z88_32K_ROM;
+extern const device_type Z88_128K_ROM;
+extern const device_type Z88_256K_ROM;
+
+#endif /* __Z88_ROM_H__ */