summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/nuon/nuon.h
blob: ecdb5cc6d76e40bd5fae93b58d14582e9c1834cc (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
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
/*
    VM Labs Aries 3 "NUON Multi-Media Architecture" simulator

    - Changelist -
      10 Mar. 2018
      - Initial skeleton version.
*/

#ifndef MAME_CPU_NUON_NUON_H
#define MAME_CPU_NUON_NUON_H

#pragma once

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

class nuon_device : public cpu_device
{
public:
	nuon_device(const machine_config &mconfig, const char *tag, device_t *owner, const XTAL &clock);

protected:
	// device-level overrides
	virtual void device_start() override;
	virtual void device_reset() override;

	// device_execute_interface overrides
	virtual uint32_t execute_min_cycles() const noexcept override;
	virtual uint32_t execute_max_cycles() const noexcept override;
	virtual uint32_t execute_input_lines() const noexcept override;
	virtual void execute_run() override;
	virtual void execute_set_input(int inputnum, int state) override;

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

	// device_disasm_interface overrides
	virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;

	// device_state_interface overrides
	virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;

	// utility functions
	void unimplemented_opcode(uint32_t op);

	struct mpe_t
	{
		// address spaces
		const address_space_config m_program_config;
		address_space *m_program;

		// registers
		uint32_t m_pc;
	};

	const address_space_config m_program_configs[4];
	address_space *m_program[4];

	// registers
	uint32_t m_pc[4];

	// other internal states
	int m_icount;
};

DECLARE_DEVICE_TYPE(NUON,   nuon_device)

#endif /* MAME_CPU_NUON_NUON_H */