summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/machine/prof80mmu.h
blob: 93b1fb0895698c05e798cfda9fd5152893a0eea5 (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:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************

    Conitec PROF-80 Memory Management Unit emulation

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

#ifndef MAME_MACHINE_PROF80MMU_H
#define MAME_MACHINE_PROF80MMU_H

#pragma once


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

// ======================> prof80_mmu_device

class prof80_mmu_device : public device_t, public device_memory_interface
{
public:
	prof80_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	virtual void z80_program_map(address_map &map);

	void par_w(offs_t offset, uint8_t data);
	DECLARE_WRITE_LINE_MEMBER( mme_w );

	void program_map(address_map &map);
protected:
	// device-level overrides
	virtual void device_start() override;

	// device_memory_interface overrides
	virtual space_config_vector memory_space_config() const override;

	uint8_t program_r(offs_t offset);
	void program_w(offs_t offset, uint8_t data);

private:
	const address_space_config m_program_space_config;

	uint8_t m_blk[16];
	bool m_enabled;
};


// device type definition
DECLARE_DEVICE_TYPE(PROF80_MMU, prof80_mmu_device)



#endif // MAME_MACHINE_PROF80MMU_H