summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/vp590.h
blob: 56e2148c9f09eb505ae0e1f65dde7515c7cffe85 (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
72
/**********************************************************************

    RCA VIP Color Board VP590 emulation

    Copyright MESS Team.
    Visit http://mamedev.org for licensing and usage restrictions.

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

#pragma once

#ifndef __VP590__
#define __VP590__

#include "emu.h"
#include "machine/rescap.h"
#include "machine/vip_exp.h"
#include "video/cdp1862.h"



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

// ======================> vp590_device

class vp590_device : public device_t,
					 public device_vip_expansion_card_interface
{
public:
	// construction/destruction
	vp590_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);

	// optional information overrides
	virtual machine_config_constructor device_mconfig_additions() const;
	virtual ioport_constructor device_input_ports() const;

	// not really public
	DECLARE_READ_LINE_MEMBER( rd_r );
	DECLARE_READ_LINE_MEMBER( bd_r );
	DECLARE_READ_LINE_MEMBER( gd_r );

protected:
	// device-level overrides
	virtual void device_config_complete() { m_shortname = "vp590"; }
	virtual void device_start();

	// device_vip_expansion_card_interface overrides
	virtual void vip_program_w(address_space &space, offs_t offset, UINT8 data, int cdef, int *minh);
	virtual void vip_io_w(address_space &space, offs_t offset, UINT8 data);
	virtual void vip_dma_w(address_space &space, offs_t offset, UINT8 data);
	virtual UINT32 vip_screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
	virtual int vip_ef3_r();
	virtual int vip_ef4_r();

private:
	required_device<cdp1862_device> m_cgc;

	int m_a12;
	UINT8 *m_color_ram;
	UINT8 m_color;

	UINT8 m_keylatch;
};


// device type definition
extern const device_type VP590;


#endif