diff options
Diffstat (limited to 'src/mess/machine/iq151_rom.h')
-rw-r--r-- | src/mess/machine/iq151_rom.h | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/src/mess/machine/iq151_rom.h b/src/mess/machine/iq151_rom.h new file mode 100644 index 00000000000..f2d50d18a21 --- /dev/null +++ b/src/mess/machine/iq151_rom.h @@ -0,0 +1,143 @@ +#pragma once + +#ifndef __IQ151_ROM_H__ +#define __IQ151_ROM_H__ + +#include "emu.h" +#include "machine/iq151cart.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); + + // 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: + // device-level overrides + virtual void device_config_complete() { m_shortname = "iq151_basic6"; } + + // 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: + // device-level overrides + virtual void device_config_complete() { m_shortname = "iq151_basicg"; } + + // 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: + // device-level overrides + virtual void device_config_complete() { m_shortname = "iq151_amos1"; } + + // 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: + // device-level overrides + virtual void device_config_complete() { m_shortname = "iq151_amos2"; } + + // 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: + // device-level overrides + virtual void device_config_complete() { m_shortname = "iq151_amos3"; } + + // 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__ */ |