summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/amiga/zorro/a2058.h
blob: 9b361b403e4105cd60b87bed84a1594be4fd73e7 (plain) (blame)
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
// license:GPL-2.0+
// copyright-holders:Dirk Best
/***************************************************************************

    Commodore A2058

    Zorro-II RAM Expansion (2, 4 or 8 MB)

***************************************************************************/

#ifndef MAME_BUS_AMIGA_ZORRO_A2058_H
#define MAME_BUS_AMIGA_ZORRO_A2058_H

#pragma once

#include "zorro.h"
#include "machine/autoconfig.h"


namespace bus::amiga::zorro {

//**************************************************************************
//  TYPE DEFINITIONS
//**************************************************************************

// ======================> a2058_device

class a2058_device : public device_t, public device_zorro2_card_interface, public amiga_autoconfig
{
public:
	// construction/destruction
	a2058_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

protected:
	virtual ioport_constructor device_input_ports() const override ATTR_COLD;
	virtual void device_start() override ATTR_COLD;

	// device_zorro2_card_interface overrides
	virtual DECLARE_WRITE_LINE_MEMBER( cfgin_w ) override;

	// amiga_autoconfig overrides
	virtual void autoconfig_base_address(offs_t address) override;

private:
	required_ioport m_config;
	std::unique_ptr<uint16_t[]> m_ram;
	int m_ram_size;
};

} // namespace bus::amiga::zorro

// device type definition
DECLARE_DEVICE_TYPE_NS(ZORRO_A2058, bus::amiga::zorro, a2058_device)

#endif // MAME_BUS_AMIGA_ZORRO_A2058_H