summaryrefslogtreecommitdiffstats
path: root/docs/release/scripts/minimaws/lib/lxparse.py
diff options
context:
space:
mode:
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
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:BSD-3-Clause
// copyright-holders:hap
/*

  Matsushita (Panasonic) MN1400 family MCU cores

  Don't include this file, include the specific device header instead,
  for example mn1400.h

*/

#ifndef MAME_CPU_MN1400_MN1400BASE_H
#define MAME_CPU_MN1400_MN1400BASE_H

#pragma once


class mn1400_base_device : public cpu_device
{
public:
	// configuration helpers
	// I/O ports:

protected:
	// construction/destruction
	mn1400_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data);

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

	// device_execute_interface overrides
	virtual u64 execute_clocks_to_cycles(u64 clocks) const noexcept override { return (clocks + 3 - 1) / 3; } // 3-phase clock
	virtual u64 execute_cycles_to_clocks(u64 cycles) const noexcept override { return (cycles * 3); }
	virtual u32 execute_min_cycles() const noexcept override { return 1; }
	virtual u32 execute_max_cycles() const noexcept override { return 2; }
	virtual void execute_run() override;
	virtual void execute_one() = 0;

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

	address_space_config m_program_config;
	address_space_config m_data_config;
	address_space *m_program;
	address_space *m_data;

	int m_icount;
	int m_state_count;

	int m_prgwidth; // ROM/RAM address size
	int m_datawidth; // "
	u16 m_prgmask; // "
	u16 m_datamask; // "

	virtual void cycle();
	virtual void increment_pc();
	virtual bool op_has_param(u8 op) = 0;

	u16 m_pc;
	u16 m_prev_pc;
	u8 m_op;
	u8 m_prev_op;
	u8 m_param;

	u8 m_a;
	u8 m_x;
	u8 m_y;

	// i/o handlers
};


#endif // MAME_CPU_MN1400_MN1400BASE_H