summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video/tms9928a.h
blob: 1d8c72458f93c4be67d944b81bc5cf0afc4583e7 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
** File: tms9928a.h -- software implementation of the TMS9928A VDP.
**
** By Sean Young 1999 (sean@msxnet.org).
*/

/*

    Model           Video       Hz

    TMS9918         NTSC        60
    TMS9918A        NTSC        60
    TMS9118         NTSC        60
    V9938
    V9958
    V9990

    TMS9928A        YPbPr       60
    TMS9128         YPbPr       60

    TMS9929A        YPbPr       50
    TMS9129         YPbPr       50

*/

#define TMS9928A_PALETTE_SIZE           16

/*
** The different models
*/
typedef enum
{
	TMS_INVALID_MODEL,
	TMS99x8,
	TMS9929,
	TMS99x8A,
	TMS9929A
} tms9928a_model;

/*
** MachineDriver video declarations for the TMS9928A chip
*/
typedef struct TMS9928a_interface
{
	tms9928a_model model;		/* model: tms9929(a) runs at 50Hz instead of 60Hz */
	int vram;					/* VRAM size in bytes (4k, 8k or 16k) */
	int borderx, bordery;		/* number of border pixels to show in each direction */
	void (*int_callback)(running_machine *, int);	/* callback which is called whenever the state
                                ** of the INT output of the TMS9918A changes (may be NULL)*/
} TMS9928a_interface;

/*
** configuration function
*/
extern void TMS9928A_configure (const TMS9928a_interface *intf);

/*
** visible area query
*/
extern const rectangle *TMS9928A_get_visarea (void);

/*
** reset function
*/
extern void TMS9928A_reset (void);

/*
** The I/O functions
*/
extern READ8_HANDLER (TMS9928A_vram_r);
extern WRITE8_HANDLER (TMS9928A_vram_w);
extern READ8_HANDLER (TMS9928A_register_r);
extern WRITE8_HANDLER (TMS9928A_register_w);

/*
** Call this function to render the screen.
*/
extern VIDEO_START( tms9928a );
extern VIDEO_UPDATE( tms9928a );

/*
** This next function must be called 50 (tms9929a) or 60 (tms99x8a) times per second,
** to generate the necessary interrupts
*/
int TMS9928A_interrupt (running_machine *machine);

/*
** The parameter is a function pointer. This function is called whenever
** the state of the INT output of the TMS9918A changes.
*/
/*void TMS9928A_int_callback (void (*callback)(int));*/

/*
** Set display of illegal sprites on or off
*/
void TMS9928A_set_spriteslimit (int);

/*
** After loading a state, call this function
*/
void TMS9928A_post_load (running_machine *machine);

/*
** MachineDriver video declarations for the TMS9928A chip
*/
MACHINE_CONFIG_EXTERN( tms9928a );