Previous 15994 Revisions Next

r11673 Friday 27th May, 2011 at 10:11:12 UTC by Miodrag Milanović
Removed crtc6845 and updated pc_vga_mess code (no whatsnew)
[src/mess]mess.mak
[src/mess/includes]crtc6845.h
[src/mess/video]cirrus.c crtc6845.c pc_vga_mess.c pc_vga_mess.h

src/mess/includes/crtc6845.h
r11672r11673
1/***************************************************************************
2
3    Motorola 6845 CRT controller and emulation
4
5    This code emulates the functionality of the 6845 chip, and also
6    supports the functionality of chips related to the 6845
7
8    Peter Trauner
9    Nathan Woods
10
11***************************************************************************/
12
13#ifndef MSCRTC6845_H_
14#define MSCRTC6845_H_
15
16/***************************************************************************
17
18    Constants
19
20***************************************************************************/
21
22/* since this code is used to support emulations of pseudo-M6845 chips, that
23   support functionality simlar to 6845's but are not true M6845 chips, we
24   need to have a concept of a personality */
25#define M6845_PERSONALITY_GENUINE   0
26#define M6845_PERSONALITY_PC1512   1
27
28/***************************************************************************
29
30    Type definitions
31
32***************************************************************************/
33
34/*----------- defined in video/crtc6845.c -----------*/
35
36/* opaque structure representing a crtc8645 chip */
37struct mscrtc6845;
38
39struct mscrtc6845_cursor
40{
41   int on;
42   int pos;
43   int top;
44   int bottom;
45};
46
47struct mscrtc6845_config
48{
49   int freq;
50   void (*cursor_changed)(struct mscrtc6845_cursor *old);
51   int personality;
52};
53
54/***************************************************************************
55
56    Externs
57
58***************************************************************************/
59
60/* generic mscrtc6845 instance */
61extern struct mscrtc6845 *mscrtc6845;
62
63/***************************************************************************
64
65    Prototypes
66
67***************************************************************************/
68
69struct mscrtc6845 *mscrtc6845_init(running_machine &machine, const struct mscrtc6845_config *config);
70
71void mscrtc6845_set_clock(struct mscrtc6845 *crtc, int freq);
72
73/* to be called before drawing screen */
74void mscrtc6845_time(running_machine &machine, struct mscrtc6845 *crtc);
75
76int mscrtc6845_get_char_columns(struct mscrtc6845 *crtc);
77int mscrtc6845_get_char_height(struct mscrtc6845 *crtc);
78int mscrtc6845_get_char_lines(struct mscrtc6845 *crtc);
79int mscrtc6845_get_start(struct mscrtc6845 *crtc);
80void mscrtc6845_set_char_columns(struct mscrtc6845 *crtc, UINT8 columns);
81void mscrtc6845_set_char_lines(struct mscrtc6845 *crtc, UINT8 lines);
82
83int mscrtc6845_get_personality(struct mscrtc6845 *crtc);
84
85/* cursor off, cursor on, cursor 16 frames on/off, cursor 32 frames on/off
86    start line, end line */
87void mscrtc6845_get_cursor(struct mscrtc6845 *crtc, struct mscrtc6845_cursor *cursor);
88
89UINT8 mscrtc6845_port_r(struct mscrtc6845 *crtc, int offset);
90int mscrtc6845_port_w(struct mscrtc6845 *crtc, int offset, UINT8 data);
91
92/* to be called when writting to port */
93WRITE8_HANDLER ( mscrtc6845_0_port_w );
94
95/* to be called when reading from port */
96READ8_HANDLER ( mscrtc6845_0_port_r );
97
98/***************************************************************************
99
100    6845 variant macros
101
102    These are used to support emulations of 6845 variants, but these will
103    be eventually merged into mscrtc6845.c so these are deprecated
104
105***************************************************************************/
106
107#define CRTC6845_COLUMNS (REG(0)+1)
108#define CRTC6845_CHAR_COLUMNS (REG(1))
109#define CRTC6845_LINES (REG(4)*CRTC6845_CHAR_HEIGHT+REG(5))
110#define CRTC6845_CHAR_LINES REG(6)
111#define CRTC6845_CHAR_HEIGHT ((REG(9)&0x1f)+1)
112#define CRTC6845_VIDEO_START ((REG(0xc)<<8)|REG(0xd))
113#define CRTC6845_INTERLACE_MODE (REG(8)&3)
114#define CRTC6845_INTERLACE_SIGNAL 1
115#define CRTC6845_INTERLACE 3
116#define CRTC6845_CURSOR_MODE (REG(0xa)&0x60)
117#define CRTC6845_CURSOR_OFF 0x20
118#define CRTC6845_CURSOR_16FRAMES 0x40
119#define CRTC6845_CURSOR_32FRAMES 0x60
120#define CRTC6845_SKEW   (REG(8)&15)
121#define CRTC6845_CURSOR_POS ((REG(0xe)<<8)|REG(0xf))
122#define CRTC6845_CURSOR_TOP   (REG(0xa)&0x1f)
123#define CRTC6845_CURSOR_BOTTOM REG(0xb)
124
125#endif /* MSCRTC6845_H_ */
src/mess/video/crtc6845.c
r11672r11673
1/***************************************************************************
2
3    Motorola 6845 CRT controller and emulation
4
5    This code emulates the functionality of the 6845 chip, and also
6    supports the functionality of chips related to the 6845
7
8    Peter Trauner
9    Nathan Woods
10
11    Registers
12        00 - Horiz. total characters
13        01 - Horiz. displayed characters per line
14        02 - Horiz. synch position
15        03 - Horiz. synch width in characters
16        04 - Vert. total lines
17        05 - Vert. total adjust (scan lines)
18        06 - Vert. displayed rows
19        07 - Vert. synch position (character rows)
20        08 - Interlace mode
21        09 - Maximum scan line address
22        0A - Cursor start (scan line)
23        0B - Cursor end (scan line)
24        0C - Start address (MSB)
25        0D - Start address (LSB)
26        0E - Cursor address (MSB) (read/write)
27        0F - Cursor address (LSB) (read/write)
28        10 - Light pen (MSB)   (read only)
29        11 - Light pen (LSB)   (read only)
30
31***************************************************************************/
32
33
34#include "emu.h"
35#include "includes/crtc6845.h"
36
37
38/***************************************************************************
39
40    Type definitions
41
42***************************************************************************/
43
44struct mscrtc6845
45{
46   struct mscrtc6845_config config;
47   UINT8 reg[18];
48   UINT8 idx;
49   double cursor_time;
50   int cursor_on;
51};
52
53struct reg_mask
54{
55   UINT8 store_mask;
56   UINT8 read_mask;
57};
58
59struct mscrtc6845 *mscrtc6845;
60
61/***************************************************************************
62
63    Local variables
64
65***************************************************************************/
66
67/*-------------------------------------------------
68    mscrtc6845_reg_mask - an array specifying how
69    much of any given register "registers", per
70    m6845 personality
71-------------------------------------------------*/
72
73static const struct reg_mask mscrtc6845_reg_mask[2][18] =
74{
75   {
76      /* M6845_PERSONALITY_GENUINE */
77      { 0xff, 0x00 },   { 0xff, 0x00 },   { 0xff, 0x00 },   { 0xff, 0x00 },
78      { 0x7f, 0x00 },   { 0x1f, 0x00 },   { 0x7f, 0x00 },   { 0x7f, 0x00 },
79      { 0x3f, 0x00 },   { 0x1f, 0x00 },   { 0x7f, 0x00 },   { 0x1f, 0x00 },
80      { 0x3f, 0x3f },   { 0xff, 0xff },   { 0x3f, 0x3f },   { 0xff, 0xff },
81      { 0xff, 0x3f },   { 0xff, 0xff }
82   },
83   {
84      /* M6845_PERSONALITY_PC1512 */
85      { 0x00, 0x00 },   { 0x00, 0x00 },   { 0x00, 0x00 },   { 0x00, 0x00 },
86      { 0x00, 0x00 },   { 0x00, 0x00 },   { 0x00, 0x00 },   { 0x00, 0x00 },
87      { 0x00, 0x00 },   { 0x1f, 0x00 },   { 0x7f, 0x00 },   { 0x1f, 0x00 },
88      { 0x3f, 0x3f },   { 0xff, 0xff },   { 0x3f, 0x3f },   { 0xff, 0xff },
89      { 0xff, 0x3f },   { 0xff, 0xff }
90   }
91};
92
93/* The PC1512 has not got a full MC6845; the first 9 registers act as if they
94 * had these hardwired values: */
95static const UINT8 pc1512_defaults[] =
96{
97   113, 80, 90, 10, 127, 6, 100, 112, 2
98};
99
100/***************************************************************************
101
102    Functions
103
104***************************************************************************/
105
106struct mscrtc6845 *mscrtc6845_init(running_machine &machine, const struct mscrtc6845_config *config)
107{
108   struct mscrtc6845 *crtc;
109   int idx;
110
111   crtc = auto_alloc_clear(machine, struct mscrtc6845);
112   crtc->cursor_time = machine.time().as_double();
113   crtc->config = *config;
114   mscrtc6845 = crtc;
115
116   /* Hardwire the values which can't be changed in the PC1512 version */
117   if (config->personality == M6845_PERSONALITY_PC1512)
118   {
119      for (idx = 0; idx < sizeof(pc1512_defaults); idx++)
120      {
121         crtc->reg[idx] = pc1512_defaults[idx];
122      }
123   }
124
125   state_save_register_item_array(machine, "mscrtc6845", NULL, 0, crtc->reg);
126   state_save_register_item(machine, "mscrtc6845", NULL, 0, crtc->idx);
127   return crtc;
128}
129
130#define REG(x) (crtc->reg[x])
131
132static int mscrtc6845_clocks_in_frame(struct mscrtc6845 *crtc)
133{
134   int clocks=CRTC6845_COLUMNS*CRTC6845_LINES;
135   switch (CRTC6845_INTERLACE_MODE) {
136   case CRTC6845_INTERLACE_SIGNAL: // interlace generation of video signals only
137   case CRTC6845_INTERLACE: // interlace
138      return clocks/2;
139   default:
140      return clocks;
141   }
142}
143
144void mscrtc6845_set_clock(struct mscrtc6845 *crtc, int freq)
145{
146   assert(crtc);
147   crtc->config.freq = freq;
148}
149
150void mscrtc6845_time(running_machine &machine, struct mscrtc6845 *crtc)
151{
152   double neu, ftime;
153   struct mscrtc6845_cursor cursor;
154
155   neu = machine.time().as_double();
156
157   if (mscrtc6845_clocks_in_frame(crtc) == 0.0)
158      return;
159
160   ftime = mscrtc6845_clocks_in_frame(crtc) * 16.0 / crtc->config.freq;
161
162   if (CRTC6845_CURSOR_MODE==CRTC6845_CURSOR_32FRAMES)
163      ftime*=2;
164
165   if (neu-crtc->cursor_time>ftime)
166   {
167      crtc->cursor_time += ftime;
168      mscrtc6845_get_cursor(crtc, &cursor);
169
170      if (crtc->config.cursor_changed)
171         crtc->config.cursor_changed(&cursor);
172
173      crtc->cursor_on ^= 1;
174   }
175}
176
177int mscrtc6845_get_char_columns(struct mscrtc6845 *crtc)
178{
179   return CRTC6845_CHAR_COLUMNS;
180}
181
182int mscrtc6845_get_char_height(struct mscrtc6845 *crtc)
183{
184   return CRTC6845_CHAR_HEIGHT;
185}
186
187int mscrtc6845_get_char_lines(struct mscrtc6845 *crtc)
188{
189   return CRTC6845_CHAR_LINES;
190}
191
192int mscrtc6845_get_start(struct mscrtc6845 *crtc)
193{
194   return CRTC6845_VIDEO_START;
195}
196
197
198void mscrtc6845_set_char_columns(struct mscrtc6845 *crtc, UINT8 columns)
199{
200   crtc->reg[1] = columns;
201}
202
203
204void mscrtc6845_set_char_lines(struct mscrtc6845 *crtc, UINT8 lines)
205{
206   crtc->reg[6] = lines;
207}
208
209
210int mscrtc6845_get_personality(struct mscrtc6845 *crtc)
211{
212   return crtc->config.personality;
213}
214
215void mscrtc6845_get_cursor(struct mscrtc6845 *crtc, struct mscrtc6845_cursor *cursor)
216{
217   switch (CRTC6845_CURSOR_MODE) {
218   case CRTC6845_CURSOR_OFF:
219      cursor->on = 0;
220      break;
221
222   case CRTC6845_CURSOR_16FRAMES:
223   case CRTC6845_CURSOR_32FRAMES:
224      cursor->on = crtc->cursor_on;
225      break;
226
227   default:
228      cursor->on = 1;
229      break;
230   }
231
232   cursor->pos = CRTC6845_CURSOR_POS;
233   cursor->top = CRTC6845_CURSOR_TOP;
234   cursor->bottom = CRTC6845_CURSOR_BOTTOM;
235}
236
237UINT8 mscrtc6845_port_r(struct mscrtc6845 *crtc, int offset)
238{
239   UINT8 val = 0xff;
240   int idx;
241
242   if (offset & 1)
243   {
244      idx = crtc->idx & 0x1f;
245      if (idx < ARRAY_LENGTH(crtc->reg))
246         val = crtc->reg[idx] & mscrtc6845_reg_mask[crtc->config.personality][idx].read_mask;
247   }
248   else
249   {
250      val = crtc->idx;
251   }
252   return val;
253}
254
255int mscrtc6845_port_w(struct mscrtc6845 *crtc, int offset, UINT8 data)
256{
257   struct mscrtc6845_cursor cursor;
258   int idx;
259   UINT8 mask;
260
261   if (offset & 1)
262   {
263      /* write to a 6845 register, if supported */
264      idx = crtc->idx & 0x1f;
265      if (idx < ARRAY_LENGTH(crtc->reg))
266      {
267         mask = mscrtc6845_reg_mask[crtc->config.personality][idx].store_mask;
268         /* Don't zero out bits not covered by the mask. */
269         crtc->reg[crtc->idx] &= ~mask;
270         crtc->reg[crtc->idx] |= (data & mask);
271
272         /* are there special consequences to writing to this register? */
273         switch (idx) {
274         case 0xa:
275         case 0xb:
276         case 0xe:
277         case 0xf:
278            mscrtc6845_get_cursor(crtc, &cursor);
279            if (crtc->config.cursor_changed)
280               crtc->config.cursor_changed(&cursor);
281            break;
282         }
283
284         /* since the PC1512 does not support the number of lines register directly,
285             * this value is keyed off of register 9
286             */
287         if ((crtc->config.personality == M6845_PERSONALITY_PC1512) && (idx == 9))
288         {
289            UINT8 char_height;
290            char_height = mscrtc6845_get_char_height(crtc);
291            mscrtc6845_set_char_lines(crtc, 200 ); // / char_height);
292         }
293         return TRUE;
294      }
295   }
296   else
297   {
298      /* change the idx register */
299      crtc->idx = data;
300   }
301   return FALSE;
302}
303
304 READ8_HANDLER ( mscrtc6845_0_port_r )
305{
306   return mscrtc6845_port_r(mscrtc6845, offset);
307}
308
309WRITE8_HANDLER ( mscrtc6845_0_port_w )
310{
311   mscrtc6845_port_w(mscrtc6845, offset, data);
312}
313
src/mess/video/pc_vga_mess.c
r11672r11673
3030
3131#include "emu.h"
3232#include "pc_vga_mess.h"
33#include "includes/crtc6845.h"
3433
3534/***************************************************************************
3635
r11672r11673
3837
3938***************************************************************************/
4039
41static size_t pc_videoram_size;
40static pc_video_update_proc (*pc_choosevideomode)(running_machine &machine, int *width, int *height);
4241
43static pc_video_update_proc (*pc_choosevideomode)(running_machine &machine, int *width, int *height, struct mscrtc6845 *crtc);
44static struct mscrtc6845 *pc_crtc;
45
4642static int pc_current_height;
4743static int pc_current_width;
4844/***************************************************************************
r11672r11673
5854static VIDEO_START( vga );
5955static VIDEO_RESET( vga );
6056
61static pc_video_update_proc pc_vga_choosevideomode(running_machine &machine, int *width, int *height, struct mscrtc6845 *crtc);
57static pc_video_update_proc pc_vga_choosevideomode(running_machine &machine, int *width, int *height);
6258
6359/***************************************************************************
6460
r11672r11673
6662
6763***************************************************************************/
6864
69
70static void pc_video_postload(running_machine *machine)
65void pc_video_start(running_machine &machine, pc_video_update_proc (*choosevideomode)(running_machine &machine, int *width, int *height))
7166{
72   pc_current_height = -1;
73   pc_current_width = -1;
74}
75
76
77
78struct mscrtc6845 *pc_video_start(running_machine &machine, const struct mscrtc6845_config *config,
79   pc_video_update_proc (*choosevideomode)(running_machine &machine, int *width, int *height, struct mscrtc6845 *crtc),
80   size_t vramsize)
81{
8267   pc_choosevideomode = choosevideomode;
83   pc_crtc = NULL;
8468   pc_current_height = -1;
8569   pc_current_width = -1;
86   machine.generic.tmpbitmap = NULL;
87
88   pc_videoram_size = vramsize;
89   if (config)
90   {
91      pc_crtc = mscrtc6845_init(machine, config);
92      if (!pc_crtc)
93         return NULL;
94   }
95
96   if (pc_videoram_size)
97   {
98      video_start_generic_bitmapped(machine);
99   }
100
101   machine.save().register_postload(save_prepost_delegate(FUNC(pc_video_postload), &machine));
102   return pc_crtc;
10370}
10471
10572
r11672r11673
10875{
10976   UINT32 rc = 0;
11077   int w = 0, h = 0;
111   pc_video_update_proc video_update;
78   pc_video_update_proc video_update = pc_choosevideomode(screen->machine(), &w, &h);
11279
113   if (pc_crtc)
114   {
115      w = mscrtc6845_get_char_columns(pc_crtc);
116      h = mscrtc6845_get_char_height(pc_crtc) * mscrtc6845_get_char_lines(pc_crtc);
117   }
118
119   video_update = pc_choosevideomode(screen->machine(), &w, &h, pc_crtc);
120
12180   if (video_update)
12281   {
12382      if ((pc_current_width != w) || (pc_current_height != h))
r11672r11673
13998         bitmap_fill(bitmap, cliprect, 0);
14099      }
141100
142      video_update(screen->machine().generic.tmpbitmap ? screen->machine().generic.tmpbitmap : bitmap, pc_crtc);
143
144      if (screen->machine().generic.tmpbitmap)
145      {
146         copybitmap(bitmap, screen->machine().generic.tmpbitmap, 0, 0, 0, 0, cliprect);
147      }
101      video_update(bitmap);
148102   }
149103   return rc;
150104}
r11672r11673
224178} vga;
225179
226180
227// to use the mscrtc6845 macros
228181#define REG(x) vga.crtc.data[x]
229182
183#define CRTC_CHAR_HEIGHT ((REG(9)&0x1f)+1)
184#define CRTC_CURSOR_MODE (REG(0xa)&0x60)
185#define CRTC_CURSOR_OFF 0x20
186#define CRTC_SKEW   (REG(8)&15)
187#define CRTC_CURSOR_POS ((REG(0xe)<<8)|REG(0xf))
188#define CRTC_CURSOR_TOP   (REG(0xa)&0x1f)
189#define CRTC_CURSOR_BOTTOM REG(0xb)
190
230191#define DOUBLESCAN ((vga.crtc.data[9]&0x80)||((vga.crtc.data[9]&0x1f)!=0))
231192#define CRTC_PORT_ADDR ((vga.miscellaneous_output&1)?0x3d0:0x3b0)
232193
r11672r11673
250211#define VGA_LINE_LENGTH (EGA_LINE_LENGTH<<2)
251212
252213#define CHAR_WIDTH ((vga.sequencer.data[1]&1)?8:9)
253//#define CHAR_HEIGHT ((vga.crtc.data[9]&0x1f)+1)
254214
255215#define TEXT_COLUMNS (vga.crtc.data[1]+1)
256216#define TEXT_START_ADDRESS (EGA_START_ADDRESS)
r11672r11673
258218
259219#define TEXT_COPY_9COLUMN(ch) ((ch>=192)&&(ch<=223)&&(vga.attribute.data[0x10]&4))
260220
261//#define CURSOR_ON (!(vga.crtc.data[0xa]&0x20))
262//#define CURSOR_STARTLINE (vga.crtc.data[0xa]&0x1f)
263//#define CURSOR_ENDLINE (vga.crtc.data[0xb]&0x1f)
264//#define CURSOR_POS (vga.crtc.data[0xf]|(vga.crtc.data[0xe]<<8))
265
266221#define FONT1 (  ((vga.sequencer.data[3]&0x3)    |((vga.sequencer.data[3]&0x10)<<2))*0x2000 )
267222#define FONT2 ( (((vga.sequencer.data[3]&0xc)>>2)|((vga.sequencer.data[3]&0x20)<<3))*0x2000 )
268223
r11672r11673
10491004   vga.monitor.get_sync_lines=vga_get_crtc_sync_lines;
10501005   vga.monitor.get_sync_columns=vga_get_crtc_sync_columns;
10511006   machine.scheduler().timer_pulse(attotime::from_hz(60), FUNC(vga_timer));
1052   pc_video_start(machine, NULL, pc_vga_choosevideomode, 0);
1007   pc_video_start(machine, pc_vga_choosevideomode);
10531008}
10541009
10551010static VIDEO_RESET( vga )
r11672r11673
10571012   pc_vga_reset(machine);
10581013}
10591014
1060static void vga_vh_text(bitmap_t *bitmap, struct mscrtc6845 *crtc)
1015static void vga_vh_text(bitmap_t *bitmap)
10611016{
10621017   UINT8 ch, attr;
10631018   UINT8 bits;
10641019   UINT8 *font;
10651020   UINT16 *bitmapline;
1066   int width=CHAR_WIDTH, height=CRTC6845_CHAR_HEIGHT;
1021   int width=CHAR_WIDTH, height=CRTC_CHAR_HEIGHT;
10671022   int pos, line, column, mask, w, h, addr;
10681023   pen_t pen;
10691024
1070   if (CRTC6845_CURSOR_MODE!=CRTC6845_CURSOR_OFF)
1025   if (CRTC_CURSOR_MODE!=CRTC_CURSOR_OFF)
10711026   {
10721027      if (++vga.cursor.time>=0x10)
10731028      {
r11672r11673
10761031      }
10771032   }
10781033
1079   for (addr = TEXT_START_ADDRESS, line = -CRTC6845_SKEW; line < TEXT_LINES;
1034   for (addr = TEXT_START_ADDRESS, line = -CRTC_SKEW; line < TEXT_LINES;
10801035       line += height, addr += TEXT_LINE_LENGTH)
10811036   {
10821037      for (pos = addr, column=0; column<TEXT_COLUMNS; column++, pos++)
r11672r11673
11101065               bitmapline[column*width+w] = pen;
11111066            }
11121067         }
1113         if ((CRTC6845_CURSOR_MODE!=CRTC6845_CURSOR_OFF)
1114            &&vga.cursor.visible&&(pos==CRTC6845_CURSOR_POS))
1068         if ((CRTC_CURSOR_MODE!=CRTC_CURSOR_OFF)
1069            &&vga.cursor.visible&&(pos==CRTC_CURSOR_POS))
11151070         {
1116            for (h=CRTC6845_CURSOR_TOP;
1117                (h<=CRTC6845_CURSOR_BOTTOM)&&(h<height)&&(line+h<TEXT_LINES);
1071            for (h=CRTC_CURSOR_TOP;
1072                (h<=CRTC_CURSOR_BOTTOM)&&(h<height)&&(line+h<TEXT_LINES);
11181073                h++)
11191074            {
11201075               plot_box(bitmap, column*width, line+h, width, 1, vga.pens[attr&0xf]);
r11672r11673
11241079   }
11251080}
11261081
1127static void vga_vh_ega(bitmap_t *bitmap, struct mscrtc6845 *crtc)
1082static void vga_vh_ega(bitmap_t *bitmap)
11281083{
11291084   int pos, line, column, c, addr, i;
1130   int height = CRTC6845_CHAR_HEIGHT;
1085   int height = CRTC_CHAR_HEIGHT;
11311086   UINT16 *bitmapline;
11321087   UINT16 *newbitmapline;
11331088   pen_t pen;
r11672r11673
11691124   }
11701125}
11711126
1172static void vga_vh_vga(bitmap_t *bitmap, struct mscrtc6845 *crtc)
1127static void vga_vh_vga(bitmap_t *bitmap)
11731128{
11741129   int pos, line, column, c, addr, curr_addr;
11751130   UINT16 *bitmapline;
r11672r11673
12271182   }
12281183}
12291184
1230static pc_video_update_proc pc_vga_choosevideomode(running_machine &machine, int *width, int *height, struct mscrtc6845 *crtc)
1185static pc_video_update_proc pc_vga_choosevideomode(running_machine &machine, int *width, int *height)
12311186{
12321187   pc_video_update_proc proc = NULL;
12331188   int i;
src/mess/video/pc_vga_mess.h
r11672r11673
99#ifndef PC_VGA_H
1010#define PC_VGA_H
1111
12typedef void (*pc_video_update_proc)(bitmap_t *bitmap,
13   struct mscrtc6845 *crtc);
12typedef void (*pc_video_update_proc)(bitmap_t *bitmap);
1413
15struct mscrtc6845 *pc_video_start(running_machine &machine, const struct mscrtc6845_config *config,
16   pc_video_update_proc (*choosevideomode)(running_machine &machine, int *width, int *height, struct mscrtc6845 *crtc),
17   size_t vramsize);
18
1914MACHINE_CONFIG_EXTERN( pcvideo_vga );
2015
2116struct pc_vga_interface
src/mess/video/cirrus.c
r11672r11673
6868
6969#define LOG_PCIACCESS   0
7070
71static void cirrus_update_8bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
71static void cirrus_update_8bpp(bitmap_t *bitmap)
7272{
7373   UINT16 *line;
7474   const UINT8 *vram;
r11672r11673
8787
8888
8989
90static void cirrus_update_16bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
90static void cirrus_update_16bpp(bitmap_t *bitmap)
9191{
9292   fatalerror("NYI");
9393}
9494
9595
9696
97static void cirrus_update_24bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
97static void cirrus_update_24bpp(bitmap_t *bitmap)
9898{
9999   fatalerror("NYI");
100100}
101101
102102
103103
104static void cirrus_update_32bpp(bitmap_t *bitmap, struct mscrtc6845 *crtc)
104static void cirrus_update_32bpp(bitmap_t *bitmap)
105105{
106106   fatalerror("NYI");
107107}
src/mess/mess.mak
r11672r11673
541541   $(MESS_MACHINE)/terminal.o   \
542542   $(MESS_MACHINE)/teleprinter.o   \
543543   $(MESS_MACHINE)/upd7002.o   \
544   $(MESS_VIDEO)/crtc6845.o   \
545544   $(MESS_VIDEO)/dl1416.o      \
546545   $(MESS_VIDEO)/hd44780.o      \
547546   $(MESS_VIDEO)/hd66421.o      \

Previous 15994 Revisions Next


© 1998-2018 The MESS Team