1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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 override;
virtual const rom_entry *device_rom_region() const override;
virtual UINT8* get_cart_base() override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// 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() override;
virtual DECLARE_WRITE8_MEMBER(write) override;
private:
void banked_pak_set_bank(UINT32 bank);
};
// device type definition
extern const device_type COCO_PAK_BANKED;
#endif /* __COCO_PAK_H__ */
|