summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/vcs/harmony_melody.h
blob: 35b883027313ea3f75368df8f0b12a8be8e8adb3 (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
// license:BSD-3-Clause
// copyright-holders:David Haywood
#ifndef MAME_BUS_VCS_HARMONY_MELODY_H
#define MAME_BUS_VCS_HARMONY_MELODY_H

#pragma once

#include "rom.h"
#include "cpu/arm7/lpc210x.h"


// ======================> a26_rom_harmony_device

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

	virtual void install_memory_handlers(address_space *space) override;

protected:
	virtual void device_start() override;
	virtual void device_reset() override;
	virtual void device_add_mconfig(machine_config &config) override;


private:
	void check_bankswitch(offs_t offset);
	uint8_t read(offs_t offset);
	void write(offs_t offset, uint8_t data);
	uint8_t read8_r(offs_t offset);
	void harmony_arm7_map(address_map &map);

	required_device<lpc210x_device> m_cpu;
	uint8_t m_base_bank;
};


// device type definition
DECLARE_DEVICE_TYPE(A26_ROM_HARMONY, a26_rom_harmony_device)

#endif // MAME_BUS_VCS_HARMONY_MELODY_H