~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to mess/src/mess/video/vic4567.h

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Jordi Mallach, Emmanuel Kasper
  • Date: 2011-12-19 22:56:27 UTC
  • mfrom: (0.1.2)
  • Revision ID: package-import@ubuntu.com-20111219225627-ub5oga1oys4ogqzm
Tags: 0.144-1
[ Jordi Mallach ]
* Fix syntax errors in DEP5 copyright file (lintian).
* Use a versioned copyright Format specification field.
* Update Vcs-* URLs.
* Move transitional packages to the new metapackages section, and make
  them priority extra.
* Remove references to GNU/Linux and MESS sources from copyright.
* Add build variables for s390x.
* Use .xz tarballs as it cuts 4MB for the upstream sources.
* Add nplayers.ini as a patch. Update copyright file to add CC-BY-SA-3.0.

[ Emmanuel Kasper ]
* New upstream release. Closes: #651538.
* Add Free Desktop compliant png icons of various sizes taken from
  the hydroxygen iconset
* Mess is now built from a new source package, to avoid possible source
  incompatibilities between mame and the mess overlay.
* Mame-tools are not built from the mame source package anymore, but
  from the mess source package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 *
3
 
 * video/vic4567.h
4
 
 *
5
 
 ****************************************************************************/
6
 
 
7
 
#ifndef __VIC4567_H__
8
 
#define __VIC4567_H__
9
 
 
10
 
#include "devcb.h"
11
 
 
12
 
 
13
 
/***************************************************************************
14
 
    TYPE DEFINITIONS
15
 
***************************************************************************/
16
 
 
17
 
typedef UINT8 (*vic3_lightpen_x_callback)(running_machine &machine);
18
 
typedef UINT8 (*vic3_lightpen_y_callback)(running_machine &machine);
19
 
typedef UINT8 (*vic3_lightpen_button_callback)(running_machine &machine);
20
 
 
21
 
typedef int (*vic3_dma_read)(running_machine &machine, int);
22
 
typedef int (*vic3_dma_read_color)(running_machine &machine, int);
23
 
typedef void (*vic3_irq) (running_machine &, int);
24
 
 
25
 
typedef void (*vic3_port_changed_callback) (running_machine &, int);
26
 
 
27
 
typedef UINT8 (*vic3_c64mem_callback)(running_machine &machine, int offset);
28
 
 
29
 
typedef enum
30
 
{
31
 
        VIC4567_NTSC,
32
 
        VIC4567_PAL
33
 
} vic3_type;
34
 
 
35
 
typedef struct _vic3_interface vic3_interface;
36
 
struct _vic3_interface
37
 
{
38
 
        const char         *screen;
39
 
        const char         *cpu;
40
 
 
41
 
        vic3_type type;
42
 
 
43
 
        vic3_lightpen_x_callback        x_cb;
44
 
        vic3_lightpen_y_callback        y_cb;
45
 
        vic3_lightpen_button_callback   button_cb;
46
 
 
47
 
        vic3_dma_read          dma_read;
48
 
        vic3_dma_read_color    dma_read_color;
49
 
        vic3_irq               irq;
50
 
 
51
 
        vic3_port_changed_callback        port_changed;
52
 
 
53
 
        vic3_c64mem_callback      c64_mem_r;
54
 
};
55
 
 
56
 
/***************************************************************************
57
 
    CONSTANTS
58
 
***************************************************************************/
59
 
 
60
 
#define VIC6567_CLOCK           (1022700 /* = 8181600 / 8) */ )
61
 
#define VIC6569_CLOCK           ( 985248 /* = 7881984 / 8) */ )
62
 
 
63
 
#define VIC6567_CYCLESPERLINE   65
64
 
#define VIC6569_CYCLESPERLINE   63
65
 
 
66
 
#define VIC6567_LINES           263
67
 
#define VIC6569_LINES           312
68
 
 
69
 
#define VIC6567_VRETRACERATE    (59.8245100906698 /* = 1022700 / (65 * 263) */ )
70
 
#define VIC6569_VRETRACERATE    (50.1245421245421 /* =  985248 / (63 * 312) */ )
71
 
 
72
 
#define VIC6567_HRETRACERATE    (VIC6567_CLOCK / VIC6567_CYCLESPERLINE)
73
 
#define VIC6569_HRETRACERATE    (VIC6569_CLOCK / VIC6569_CYCLESPERLINE)
74
 
 
75
 
#define VIC2_HSIZE              320
76
 
#define VIC2_VSIZE              200
77
 
 
78
 
#define VIC6567_VISIBLELINES    235
79
 
#define VIC6569_VISIBLELINES    284
80
 
 
81
 
#define VIC6567_FIRST_DMA_LINE  0x30
82
 
#define VIC6569_FIRST_DMA_LINE  0x30
83
 
 
84
 
#define VIC6567_LAST_DMA_LINE   0xf7
85
 
#define VIC6569_LAST_DMA_LINE   0xf7
86
 
 
87
 
#define VIC6567_FIRST_DISP_LINE 0x29
88
 
#define VIC6569_FIRST_DISP_LINE 0x10
89
 
 
90
 
#define VIC6567_LAST_DISP_LINE  (VIC6567_FIRST_DISP_LINE + VIC6567_VISIBLELINES - 1)
91
 
#define VIC6569_LAST_DISP_LINE  (VIC6569_FIRST_DISP_LINE + VIC6569_VISIBLELINES - 1)
92
 
 
93
 
#define VIC6567_RASTER_2_EMU(a) ((a >= VIC6567_FIRST_DISP_LINE) ? (a - VIC6567_FIRST_DISP_LINE) : (a + 222))
94
 
#define VIC6569_RASTER_2_EMU(a) (a - VIC6569_FIRST_DISP_LINE)
95
 
 
96
 
#define VIC6567_FIRSTCOLUMN     50
97
 
#define VIC6569_FIRSTCOLUMN     50
98
 
 
99
 
#define VIC6567_VISIBLECOLUMNS  418
100
 
#define VIC6569_VISIBLECOLUMNS  403
101
 
 
102
 
#define VIC6567_X_2_EMU(a)      (a)
103
 
#define VIC6569_X_2_EMU(a)      (a)
104
 
 
105
 
#define VIC6567_STARTVISIBLELINES ((VIC6567_LINES - VIC6567_VISIBLELINES)/2)
106
 
#define VIC6569_STARTVISIBLELINES 16 /* ((VIC6569_LINES - VIC6569_VISIBLELINES)/2) */
107
 
 
108
 
#define VIC6567_FIRSTRASTERLINE 34
109
 
#define VIC6569_FIRSTRASTERLINE 0
110
 
 
111
 
#define VIC6567_COLUMNS 512
112
 
#define VIC6569_COLUMNS 504
113
 
 
114
 
 
115
 
#define VIC6567_STARTVISIBLECOLUMNS ((VIC6567_COLUMNS - VIC6567_VISIBLECOLUMNS)/2)
116
 
#define VIC6569_STARTVISIBLECOLUMNS ((VIC6569_COLUMNS - VIC6569_VISIBLECOLUMNS)/2)
117
 
 
118
 
#define VIC6567_FIRSTRASTERCOLUMNS 412
119
 
#define VIC6569_FIRSTRASTERCOLUMNS 404
120
 
 
121
 
#define VIC6569_FIRST_X 0x194
122
 
#define VIC6567_FIRST_X 0x19c
123
 
 
124
 
#define VIC6569_FIRST_VISIBLE_X 0x1e0
125
 
#define VIC6567_FIRST_VISIBLE_X 0x1e8
126
 
 
127
 
#define VIC6569_MAX_X 0x1f7
128
 
#define VIC6567_MAX_X 0x1ff
129
 
 
130
 
#define VIC6569_LAST_VISIBLE_X 0x17c
131
 
#define VIC6567_LAST_VISIBLE_X 0x184
132
 
 
133
 
#define VIC6569_LAST_X 0x193
134
 
#define VIC6567_LAST_X 0x19b
135
 
 
136
 
/***************************************************************************
137
 
    DEVICE CONFIGURATION MACROS
138
 
***************************************************************************/
139
 
 
140
 
DECLARE_LEGACY_DEVICE(VIC3, vic3);
141
 
 
142
 
#define MCFG_VIC3_ADD(_tag, _interface) \
143
 
        MCFG_DEVICE_ADD(_tag, VIC3, 0) \
144
 
        MCFG_DEVICE_CONFIG(_interface)
145
 
 
146
 
 
147
 
/*----------- defined in video/vic4567.c -----------*/
148
 
 
149
 
WRITE8_DEVICE_HANDLER( vic3_port_w );
150
 
WRITE8_DEVICE_HANDLER( vic3_palette_w );
151
 
READ8_DEVICE_HANDLER( vic3_port_r );
152
 
 
153
 
void vic3_raster_interrupt_gen( device_t *device );
154
 
UINT32 vic3_video_update( device_t *device, bitmap_t *bitmap, const rectangle *cliprect );
155
 
 
156
 
 
157
 
#endif /* __VIC4567_H__ */