summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video/s2636.h
blob: 432b52f89466bdf10a84d77a79d0d0fdaf3672d5 (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
/**********************************************************************

    Signetics 2636 video chip

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

#ifndef __S2636_H__
#define __S2636_H__

#include "devcb.h"

#define S2636_IS_PIXEL_DRAWN(p)     (((p) & 0x08) ? TRUE : FALSE)
#define S2636_PIXEL_COLOR(p)        ((p) & 0x07)

/*************************************
 *
 *  Type definitions
 *
 *************************************/

typedef struct _s2636_interface s2636_interface;
struct _s2636_interface
{
	const char *screen;
	int        work_ram_size;
	int        y_offset; 
	int        x_offset;
};

/*************************************
 *
 *  Function prototypes
 *
 *************************************/

DEVICE_GET_INFO( s2636 );


/*************************************
 *
 *  Device configuration macros
 *
 *************************************/

#define S2636 DEVICE_GET_INFO_NAME( s2636 )

#define MDRV_S2636_ADD(_tag, _interface) \
	MDRV_DEVICE_ADD(_tag, S2636, 0) \
	MDRV_DEVICE_CONFIG(_interface)


/*************************************
 *
 *  Device I/O functions
 *
 *************************************/


/* returns a BITMAP_FORMAT_INDEXED16 bitmap the size of the screen
   D0-D2 of each pixel is the pixel color
   D3 indicates whether the S2636 drew this pixel - 0 = not drawn, 1 = drawn */

bitmap_t *s2636_update( const device_config *device, const rectangle *cliprect );
WRITE8_DEVICE_HANDLER( s2636_work_ram_w );
READ8_DEVICE_HANDLER( s2636_work_ram_r );


#endif /* __S2636_H__ */