summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nasbus/avc.h
blob: 58eaaa446264f0548943ceded8d03a2efd25b409 (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
// license:GPL-2.0+
// copyright-holders:Dirk Best
/***************************************************************************

    Nascom Advanced Video Card

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

#ifndef MAME_BUS_NASBUS_AVC_H
#define MAME_BUS_NASBUS_AVC_H

#pragma once

#include "nasbus.h"
#include "video/mc6845.h"
#include "emupal.h"


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

// ======================> nascom_avc_device

class nascom_avc_device : public device_t, public device_nasbus_card_interface
{
public:
	// construction/destruction
	nascom_avc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
	void control_w(uint8_t data);

	uint8_t vram_r(offs_t offset);
	void vram_w(offs_t offset, uint8_t data);

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

private:
	MC6845_UPDATE_ROW(crtc_update_row);

	required_device<mc6845_device> m_crtc;
	required_device<palette_device> m_palette;

	std::vector<uint8_t> m_r_ram;
	std::vector<uint8_t> m_g_ram;
	std::vector<uint8_t> m_b_ram;

	uint8_t m_control;
};

// device type definition
DECLARE_DEVICE_TYPE(NASCOM_AVC, nascom_avc_device)

#endif // MAME_BUS_NASBUS_AVC_H