summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/autoconfig.h
blob: 042d38861894ba7f69240652df7efb24c00de1f0 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// license:GPL-2.0+
// copyright-holders:Dirk Best
/***************************************************************************

    Amiga Autoconfig

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

#pragma once

#ifndef __AUTOCONFIG_H__
#define __AUTOCONFIG_H__

#include "emu.h"

class amiga_autoconfig
{
public:
	amiga_autoconfig();
	virtual ~amiga_autoconfig();

	// read from autoconfig space
	DECLARE_READ16_MEMBER( autoconfig_read );

	// write to autoconfig space
	DECLARE_WRITE16_MEMBER( autoconfig_write );

protected:
	enum board_type
	{
		BOARD_TYPE_ZORRO3 = 2,
		BOARD_TYPE_ZORRO2 = 3
	};

	enum board_size
	{
		BOARD_SIZE_8M = 0,
		BOARD_SIZE_64K = 1,
		BOARD_SIZE_128K = 2,
		BOARD_SIZE_256K = 3,
		BOARD_SIZE_512K = 4,
		BOARD_SIZE_1M = 5,
		BOARD_SIZE_2M = 6,
		BOARD_SIZE_4M = 7
	};

	// board type & size
	void autoconfig_board_type(board_type type);
	void autoconfig_board_size(board_size size);

	// various flags
	void autoconfig_rom_vector_valid(bool state);
	void autoconfig_link_into_memory(bool state);
	void autoconfig_multi_device(bool state);
	void autoconfig_8meg_preferred(bool state);
	void autoconfig_can_shutup(bool state);

	// product number, manufacturer number, serial number
	void autoconfig_product(UINT8 data);
	void autoconfig_manufacturer(UINT16 data);
	void autoconfig_serial(UINT32 data);

	// rom vector
	void autoconfig_rom_vector(UINT16 data);

	// called once we have received a valid base address from the host system
	virtual void autoconfig_base_address(offs_t address) = 0;

private:
	// configuration information about our autoconfig board, 256 nibbles
	UINT16 m_cfg[0x40];
};

#endif // __AUTOCONFIG_H__