diff options
author | 2015-09-13 08:41:44 +0200 | |
---|---|---|
committer | 2015-09-13 08:41:44 +0200 | |
commit | f88cefad27a1737c76e09d99c9fb43e173506081 (patch) | |
tree | 2d8167d03579c46e226471747eb4407bd00ed6fa /src/devices/bus/coco/coco_pak.h | |
parent | e92ac9e0fa8e99869894bea00589bbb526be30aa (diff) |
Move all devices into separate part of src tree (nw)
Diffstat (limited to 'src/devices/bus/coco/coco_pak.h')
-rw-r--r-- | src/devices/bus/coco/coco_pak.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/devices/bus/coco/coco_pak.h b/src/devices/bus/coco/coco_pak.h new file mode 100644 index 00000000000..50df99ea4d5 --- /dev/null +++ b/src/devices/bus/coco/coco_pak.h @@ -0,0 +1,65 @@ +// license:BSD-3-Clause +// copyright-holders:Nathan Woods +#pragma once + +#ifndef __COCO_PAK_H__ +#define __COCO_PAK_H__ + +#include "emu.h" +#include "cococart.h" + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> coco_pak_device + +class coco_pak_device : + public device_t, + public device_cococart_interface +{ +public: + // construction/destruction + coco_pak_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + coco_pak_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 machine_config_constructor device_mconfig_additions() const; + virtual const rom_entry *device_rom_region() const; + + virtual UINT8* get_cart_base(); +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // internal state + device_image_interface *m_cart; + cococart_slot_device *m_owner; +}; + + +// device type definition +extern const device_type COCO_PAK; + +// ======================> coco_pak_banked_device + +class coco_pak_banked_device : + public coco_pak_device +{ +public: + // construction/destruction + coco_pak_banked_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + +protected: + // device-level overrides + virtual void device_reset(); + virtual DECLARE_WRITE8_MEMBER(write); +private: + void banked_pak_set_bank(UINT32 bank); +}; + + +// device type definition +extern const device_type COCO_PAK_BANKED; +#endif /* __COCO_PAK_H__ */ |