summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/isa/ex1280.h
blob: a9637a1b1f6d1a86af16b492cc9f8055b6ea8afb (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
// license:BSD-3-Clause
// copyright-holders:Ryan Holtz
#ifndef MAME_BUS_ISA_EX1280_H
#define MAME_BUS_ISA_EX1280_H

#pragma once

#include "isa.h"
#include "cpu/tms34010/tms34010.h"
#include "video/bt45x.h"
#include "screen.h"

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

// ======================> isa16_ex1280_device

class isa16_ex1280_device : public device_t,
	public device_isa16_card_interface
{
public:
	// construction/destruction
	isa16_ex1280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);

	// Flag non working features
	static constexpr feature_type unemulated_features() { return feature::GRAPHICS | feature::PALETTE; }

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

	// optional information overrides
	virtual void device_add_mconfig(machine_config &config) override;
	virtual const tiny_rom_entry *device_rom_region() const override;

	uint16_t vram_r(offs_t offset);
	void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
	uint16_t regs_r(offs_t offset, uint16_t mem_mask = ~0);
	void regs_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
	DECLARE_WRITE_LINE_MEMBER(vblank_w);

	required_device<tms34010_device> m_cpu;
	required_device<bt451_device> m_ramdac;
	required_device<screen_device> m_screen;

	TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg);
	TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg);
	TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline_update);

	void main_map(address_map &map);

	std::vector<uint16_t> m_vram;
	uint16_t m_flags;
};


// device type definition
DECLARE_DEVICE_TYPE(ISA16_EX1280, isa16_ex1280_device)

#endif // MAME_BUS_ISA_EX1280_H