Previous 15994 Revisions Next

r3745 Saturday 6th December, 2008 at 22:37:25 UTC by Nathan Woods
Converted fillbitmap() --> bitmap_fill() for 0.128u5 [Atari Ace]
[src/mess/drivers]apexc.c
[src/mess/video]733_asr.c 911_vdt.c abc80.c abc800.c abc806.c border.c cdp1861.c cdp1862.c cdp1864.c cgenie.c electron.c galaxy.c gamecom.c gb.c hd66421.c i8275.c intv.c msm6255.c mz700.c newport.c odyssey2.c pc_video.c pcw.c pcw16.c pdp1.c samcoupe.c smsvdp.c thomson.c tx0.c vector06.c vic4567.c vtech2.c wswan.c x68k.c zx.c zx8301.c

src/mess/video/wswan.c
r3744r3745
4141      rec2.max_y = 28*8 - 1 - rec->min_x;
4242      rec2.min_x = rec->min_y;
4343      rec2.max_x = rec->max_y;
44      fillbitmap( tmpbitmap, pen, &rec2 );
44      bitmap_fill( tmpbitmap, &rec2 , pen);
4545   } else {
46      fillbitmap( tmpbitmap, pen, rec );
46      bitmap_fill( tmpbitmap, rec , pen);
4747   }
4848}
4949
src/mess/video/zx.c
r3744r3745
6666            r.min_x = old_x;
6767            r.max_x = new_x;
6868            r.min_y = r.max_y = y;
69            fillbitmap(bitmap, color, &r);
69            bitmap_fill(bitmap, &r, color);
7070            break;
7171         }
7272         else
r3744r3745
7474            r.min_x = old_x;
7575            r.max_x = visarea->max_x;
7676            r.min_y = r.max_y = y;
77            fillbitmap(bitmap, color, &r);
77            bitmap_fill(bitmap, &r, color);
7878            old_x = 0;
7979         }
8080         if (++y == height)
r3744r3745
110110   bitmap_t *bitmap = tmpbitmap;
111111
112112   r.min_y = r.max_y = ula_scanline_count;
113   fillbitmap(bitmap, 1, &r);
113   bitmap_fill(bitmap, &r, 1);
114114//   logerror("ULA %3d[%d] NMI, R:$%02X, $%04x\n", video_screen_get_vpos(machine->primary_screen), ula_scancode_count, (unsigned) cpu_get_reg(machine->cpu[0], Z80_R), (unsigned) cpu_get_reg(machine->cpu[0], Z80_PC));
115115   cpu_set_input_line(machine->cpu[0], INPUT_LINE_NMI, PULSE_LINE);
116116   if (++ula_scanline_count == height)
src/mess/video/pdp1.c
r3744r3745
6262   /* set up out bitmaps */
6363   pdp1_draw_panel_backdrop(machine, panel_bitmap);
6464
65   fillbitmap(typewriter_bitmap, pen_typewriter_bg, &typewriter_bitmap_bounds);
65   bitmap_fill(typewriter_bitmap, &typewriter_bitmap_bounds, pen_typewriter_bg);
6666
6767   /* initialize CRT */
6868   video_start_crt(pen_crt_num_levels, crt_window_offset_x, crt_window_offset_y, crt_window_width, crt_window_height);
r3744r3745
252252static void pdp1_draw_panel_backdrop(running_machine *machine, bitmap_t *bitmap)
253253{
254254   /* fill with black */
255   fillbitmap(panel_bitmap, pen_panel_bg, &panel_bitmap_bounds);
255   bitmap_fill(panel_bitmap, &panel_bitmap_bounds, pen_panel_bg);
256256
257257   /* column 1: registers, test word, test address */
258258   pdp1_draw_string(machine, bitmap, "program counter", x_panel_col1_offset, y_panel_pc_offset, color_panel_caption);
r3744r3745
381381      draw_scanline8(typewriter_bitmap, 0, y, typewriter_window_width, buf, machine->pens, -1);
382382   }
383383
384   fillbitmap(typewriter_bitmap, pen_typewriter_bg, &typewriter_scroll_clear_window);
384   bitmap_fill(typewriter_bitmap, &typewriter_scroll_clear_window, pen_typewriter_bg);
385385}
386386
387387void pdp1_typewriter_drawchar(running_machine *machine, int character)
src/mess/video/911_vdt.c
r3744r3745
501501      my_rect.min_y = y;
502502      my_rect.max_y = y + height*10 - 1;
503503
504      fillbitmap(bitmap, 0, &my_rect);
504      bitmap_fill(bitmap, &my_rect, 0);
505505   }
506506   else
507507      for (i=0; i<height; i++)
src/mess/video/i8275.c
r3744r3745
470470   i8275->fifo_write = 0;
471471
472472   if ((i8275->status_reg & I8275_STATUS_VIDEO_ENABLE)==0) {
473      fillbitmap(bitmap, get_black_pen(device->machine), cliprect);
473      bitmap_fill(bitmap, cliprect, get_black_pen(device->machine));
474474   } else {
475475      // if value < 16 it is visible otherwise not
476476      i8275->cursor_blink_cnt++;
src/mess/video/cdp1862.c
r3744r3745
119119   cdp1862_t *cdp1862 = get_safe_token(device);
120120
121121   copybitmap(bitmap, cdp1862->bitmap, 0, 0, 0, 0, cliprect);
122   fillbitmap(cdp1862->bitmap, CDP1862_BACKGROUND_COLOR_SEQUENCE[cdp1862->bgcolor] + 8, cliprect);
122   bitmap_fill(cdp1862->bitmap, cliprect, CDP1862_BACKGROUND_COLOR_SEQUENCE[cdp1862->bgcolor] + 8);
123123}
124124
125125/* Device Interface */
src/mess/video/gb.c
r3744r3745
385385            r.min_y = r.max_y = gb_lcd.current_line;
386386            r.min_x = gb_lcd.start_x;
387387            r.max_x = gb_lcd.end_x - 1;
388            fillbitmap( bitmap, gb_bpal[0], &r );
388            bitmap_fill( bitmap, &r , gb_bpal[0]);
389389         }
390390         while ( l < 2 ) {
391391            UINT8   xindex, *map, *tiles;
r3744r3745
449449               const device_config *screen = video_screen_first(machine->config);
450450               rectangle r = *video_screen_get_visible_area(screen);
451451               r.min_y = r.max_y = gb_lcd.current_line;
452               fillbitmap( bitmap, 0, &r );
452               bitmap_fill( bitmap, &r , 0);
453453            }
454454            gb_lcd.previous_line = gb_lcd.current_line;
455455         }
r3744r3745
682682               r.max_x -= SGB_XOFFSET;
683683               r.min_y = SGB_YOFFSET;
684684               r.max_y -= SGB_YOFFSET;
685               fillbitmap( bitmap, 0, &r );
685               bitmap_fill( bitmap, &r , 0);
686686            } return;
687687         case 3: /* Blank screen (white - or should it be color 0?) */
688688            {
r3744r3745
692692               r.max_x -= SGB_XOFFSET;
693693               r.min_y = SGB_YOFFSET;
694694               r.max_y -= SGB_YOFFSET;
695               fillbitmap( bitmap, 32767, &r );
695               bitmap_fill( bitmap, &r , 32767);
696696            } return;
697697         }
698698
r3744r3745
711711            r.min_x = SGB_XOFFSET;
712712            r.max_x -= SGB_XOFFSET;
713713            r.min_y = r.max_y = gb_lcd.current_line + SGB_YOFFSET;
714            fillbitmap( bitmap, 0, &r );
714            bitmap_fill( bitmap, &r , 0);
715715         }
716716         while( l < 2 ) {
717717            UINT8   xindex, sgb_palette, *map, *tiles;
r3744r3745
782782               r.min_x = SGB_XOFFSET;
783783               r.max_x -= SGB_XOFFSET;
784784               r.min_y = r.max_y = gb_lcd.current_line + SGB_YOFFSET;
785               fillbitmap(bitmap, 0, &r);
785               bitmap_fill(bitmap, &r, 0);
786786            }
787787            gb_lcd.previous_line = gb_lcd.current_line;
788788         }
r3744r3745
947947            r.min_y = r.max_y = gb_lcd.current_line;
948948            r.min_x = gb_lcd.start_x;
949949            r.max_x = gb_lcd.end_x - 1;
950            fillbitmap( bitmap, ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767, &r );
950            bitmap_fill( bitmap, &r , ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767);
951951         }
952952         while ( l < 2 ) {
953953            UINT8   xindex, *map, *tiles, *gbcmap;
r3744r3745
10391039               const device_config *screen = video_screen_first(machine->config);
10401040               rectangle r = *video_screen_get_visible_area(screen);
10411041               r.min_y = r.max_y = gb_lcd.current_line;
1042               fillbitmap( bitmap, ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767, &r );
1042               bitmap_fill( bitmap, &r , ( gbc_mode == GBC_MODE_MONO ) ? 0 : 32767);
10431043            }
10441044            gb_lcd.previous_line = gb_lcd.current_line;
10451045         }
src/mess/video/newport.c
r3744r3745
189189{
190190   int y;
191191
192   fillbitmap( bitmap, get_black_pen(screen->machine), cliprect );
192   bitmap_fill( bitmap, cliprect , get_black_pen(screen->machine));
193193
194194   /* loop over rows and copy to the destination */
195195   for( y = cliprect->min_y; y <= cliprect->max_y; y++ )
src/mess/video/pcw16.c
r3744r3745
186186      rect.max_x = PCW16_SCREEN_WIDTH;
187187      rect.max_y = PCW16_SCREEN_HEIGHT;
188188
189      fillbitmap(bitmap, border_colour, &rect);
189      bitmap_fill(bitmap, &rect, border_colour);
190190   }
191191   else
192192   {
r3744r3745
199199      rect.min_y = 0;
200200      rect.max_x = PCW16_SCREEN_WIDTH;
201201      rect.max_y = PCW16_BORDER_HEIGHT;
202      fillbitmap(bitmap, border_colour, &rect);
202      bitmap_fill(bitmap, &rect, border_colour);
203203
204204      /* render bottom border */
205205      rect.min_x = 0;
206206      rect.min_y = PCW16_BORDER_HEIGHT + PCW16_DISPLAY_HEIGHT;
207207      rect.max_x = PCW16_SCREEN_WIDTH;
208208      rect.max_y = rect.min_y + PCW16_BORDER_HEIGHT;
209      fillbitmap(bitmap, border_colour, &rect);
209      bitmap_fill(bitmap, &rect, border_colour);
210210
211211      /* render border on either side of display */
212212      plot_box(bitmap, 0,                                 PCW16_BORDER_HEIGHT, 8, PCW16_DISPLAY_HEIGHT, border_colour);
src/mess/video/gamecom.c
r3744r3745
2222      rec.min_x = 0;
2323      rec.max_x = Y_PIXELS - 1;
2424      rec.min_y = rec.max_y = scanline;
25      fillbitmap( tmpbitmap, 0, &rec );
25      bitmap_fill( tmpbitmap, &rec , 0);
2626      return;
2727   } else {
2828      UINT8 *line = &gamecom_vram[ base_address + 40 * scanline ];
src/mess/video/mz700.c
r3744r3745
5050{
5151   int offs;
5252
53   fillbitmap(bitmap, get_black_pen(screen->machine), cliprect);
53   bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
5454
5555   for(offs = 0; offs < 40*25; offs++)
5656   {
src/mess/video/abc800.c
r3744r3745
1/*****************************************************************************
2 *
3 * video/abc800.c
4 *
5 ****************************************************************************/
6 
7/*
8 
9   TODO:
10 
11   - abc800c
12 
13*/
14 
15#include "driver.h"
16#include "includes/abc80x.h"
17#include "machine/z80dart.h"
18#include "video/mc6845.h"
19 
20/* Character Memory */
21 
22READ8_HANDLER( abc800_charram_r )
23{
24   abc800_state *state = space->machine->driver_data;
25 
26   return state->charram[offset];
27}
28 
29WRITE8_HANDLER( abc800_charram_w )
30{
31   abc800_state *state = space->machine->driver_data;
32 
33   state->charram[offset] = data;
34}
35 
36/* Palette Initialization */
37 
38static PALETTE_INIT( abc800m )
39{
40   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00); // black
41   palette_set_color_rgb(machine, 1, 0xff, 0xff, 0x00); // yellow
42}
43 
44static PALETTE_INIT( abc800c )
45{
46   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00); // black
47   palette_set_color_rgb(machine, 1, 0x00, 0x00, 0xff); // blue
48   palette_set_color_rgb(machine, 2, 0xff, 0x00, 0x00); // red
49   palette_set_color_rgb(machine, 3, 0xff, 0x00, 0xff); // magenta
50   palette_set_color_rgb(machine, 4, 0x00, 0xff, 0x00); // green
51   palette_set_color_rgb(machine, 5, 0x00, 0xff, 0xff); // cyan
52   palette_set_color_rgb(machine, 6, 0xff, 0xff, 0x00); // yellow
53   palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff); // white
54}
55 
56/* External Interface */
57 
58WRITE8_HANDLER( abc800_hrs_w )
59{
60   abc800_state *state = space->machine->driver_data;
61 
62   state->hrs = data;
63}
64 
65WRITE8_HANDLER( abc800_hrc_w )
66{
67   abc800_state *state = space->machine->driver_data;
68 
69   state->fgctl = data;
70}
71 
72/* MC6845 Row Update */
73 
74static MC6845_UPDATE_ROW( abc800m_update_row )
75{
76   abc800_state *state = device->machine->driver_data;
77 
78   int column;
79   
80   /* prevent wraparound */
81   if (y >= 240) return;
82   
83   y += 29;
84 
85   for (column = 0; column < x_count; column++)
86   {
87      int bit;
88 
89      UINT16 address = (state->charram[(ma + column) & 0x7ff] << 4) | (ra & 0x0f);
90      UINT8 data = (state->char_rom[address & 0x7ff] & 0x3f);
91 
92      if (column == cursor_x)
93      {
94         data = 0x3f;
95      }
96 
97      data <<= 2;
98 
99      for (bit = 0; bit < ABC800_CHAR_WIDTH; bit++)
100      {
101         int x = 115 + (column * ABC800_CHAR_WIDTH) + bit;
102 
103         if (BIT(data, 7))
104         {
105            *BITMAP_ADDR16(bitmap, y, x) = 1;
106         }
107 
108         data <<= 1;
109      }
110   }
111}
112 
113static MC6845_ON_VSYNC_CHANGED(abc800_vsync_changed)
114{
115   abc800_state *state = device->machine->driver_data;
116 
117   z80dart_ri_w(state->z80dart, 1, vsync);
118}
119 
120/* MC6845 Interfaces */
121 
122static const mc6845_interface abc800m_mc6845_interface = {
123   SCREEN_TAG,
124   ABC800_CCLK,
125   ABC800_CHAR_WIDTH,
126   NULL,
127   abc800m_update_row,
128   NULL,
129   NULL,
130   NULL,
131   abc800_vsync_changed
132};
133 
134/* ABC 800 C */
135 
136static void abc800c_update(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
137{
138}
139 
140/* HR */
141 
142static void abc800m_hr_update(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
143{
144   abc800_state *state = machine->driver_data;
145 
146   UINT16 addr = 0;
147   int sx, y, dot;
148 
149   for (y = state->hrs + 29; y < MIN(cliprect->max_y + 1, state->hrs + 29 + 240); y++)
150   {
151      int x = 115;
152 
153      for (sx = 0; sx < 64; sx++)
154      {
155         UINT8 data = state->videoram[addr++];
156 
157         for (dot = 0; dot < 4; dot++)
158         {
159            UINT16 fgctl_addr = ((state->fgctl & 0x7f) << 2) | ((data >> 6) & 0x03);
160            int color = (state->fgctl_prom[fgctl_addr] & 0x07) ? 1 : 0;
161 
162            *BITMAP_ADDR16(bitmap, y, x++) = color;
163            *BITMAP_ADDR16(bitmap, y, x++) = color;
164 
165            data <<= 2;
166         }
167      }
168   }
169}
170 
171static void abc800c_hr_update(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
172{
173   abc800_state *state = machine->driver_data;
174 
175   UINT16 addr = 0;
176   int sx, y, dot;
177 
178   for (y = state->hrs; y < MIN(cliprect->max_y + 1, state->hrs + 240); y++)
179   {
180      int x = 0;
181 
182      for (sx = 0; sx < 64; sx++)
183      {
184         UINT8 data = state->videoram[addr++];
185 
186         for (dot = 0; dot < 4; dot++)
187         {
188            UINT16 fgctl_addr = ((state->fgctl & 0x7f) << 2) | ((data >> 6) & 0x03);
189            int color = state->fgctl_prom[fgctl_addr] & 0x07;
190 
191            *BITMAP_ADDR16(bitmap, y, x++) = color;
192 
193            data <<= 2;
194         }
195      }
196   }
197}
198 
199/* Video Start */
200 
201static VIDEO_START( abc800m )
202{
203   abc800_state *state = machine->driver_data;
204   
205   /* allocate memory */
206 
207   state->charram = auto_malloc(ABC800M_CHAR_RAM_SIZE);
208 
209   /* find devices */
210 
211   state->mc6845 = devtag_get_device(machine, MC6845, MC6845_TAG);
212 
213   /* find memory regions */
214 
215   state->char_rom = memory_region(machine, "chargen");
216   state->fgctl_prom = memory_region(machine, "fgctl");
217 
218   /* register for state saving */
219 
220   state_save_register_global_pointer(state->charram, ABC800M_CHAR_RAM_SIZE);
221   state_save_register_global_pointer(state->videoram, ABC800_VIDEO_RAM_SIZE);
222 
223   state_save_register_global(state->hrs);
224   state_save_register_global(state->fgctl);
225}
226 
227static VIDEO_START( abc800c )
228{
229   abc800_state *state = machine->driver_data;
230   
231   /* allocate memory */
232 
233   state->charram = auto_malloc(ABC800C_CHAR_RAM_SIZE);
234 
235   /* find memory regions */
236 
237   state->char_rom = memory_region(machine, "chargen");
238   state->fgctl_prom = memory_region(machine, "fgctl");
239 
240   /* register for state saving */
241 
242   state_save_register_global_pointer(state->charram, ABC800C_CHAR_RAM_SIZE);
243   state_save_register_global_pointer(state->videoram, ABC800_VIDEO_RAM_SIZE);
244 
245   state_save_register_global(state->hrs);
246   state_save_register_global(state->fgctl);
247}
248 
249/* Video Update */
250 
251static VIDEO_UPDATE( abc800m )
252{
253   abc800_state *state = screen->machine->driver_data;
254 
255   /* expand visible area to workaround MC6845 */
256   video_screen_set_visarea(screen, 0, 767, 0, 311);
257 
258   /* clear screen */
259   fillbitmap(bitmap, get_black_pen(screen->machine), cliprect);
260 
261   /* draw HR graphics */
262   abc800m_hr_update(screen->machine, bitmap, cliprect);
263   
264   if (!BIT(state->fgctl, 7))
265   {
266      /* draw text */
267      mc6845_update(state->mc6845, bitmap, cliprect);
268   }
269   
270   return 0;
271}
272 
273static VIDEO_UPDATE( abc800c )
274{
275   abc800_state *state = screen->machine->driver_data;
276 
277   /* clear screen */
278   fillbitmap(bitmap, get_black_pen(screen->machine), cliprect);
279 
280   /* draw HR graphics */
281   abc800c_hr_update(screen->machine, bitmap, cliprect);
282   
283   if (!BIT(state->fgctl, 7))
284   {
285      /* draw text */
286      abc800c_update(screen->machine, bitmap, cliprect);
287   }
288   
289   return 0;
290}
291 
292/* Machine Drivers */
293 
294MACHINE_DRIVER_START( abc800m_video )
295   MDRV_DEVICE_ADD(MC6845_TAG, MC6845)
296   MDRV_DEVICE_CONFIG(abc800m_mc6845_interface)
297 
298   MDRV_SCREEN_ADD(SCREEN_TAG, RASTER)
299   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
300 
301   MDRV_SCREEN_REFRESH_RATE(60)
302   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
303   MDRV_SCREEN_SIZE(640, 400)
304   MDRV_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1)
305 
306   MDRV_PALETTE_LENGTH(2)
307 
308   MDRV_PALETTE_INIT(abc800m)
309   MDRV_VIDEO_START(abc800m)
310   MDRV_VIDEO_UPDATE(abc800m)
311MACHINE_DRIVER_END
312 
313MACHINE_DRIVER_START( abc800c_video )
314   MDRV_SCREEN_ADD(SCREEN_TAG, RASTER)
315   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
316 
317   MDRV_SCREEN_REFRESH_RATE(60)
318   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
319   MDRV_SCREEN_SIZE(640, 400)
320   MDRV_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1)
321 
322   MDRV_PALETTE_LENGTH(8)
323 
324   MDRV_PALETTE_INIT(abc800c)
325   MDRV_VIDEO_START(abc800c)
326   MDRV_VIDEO_UPDATE(abc800c)
327MACHINE_DRIVER_END
1/*****************************************************************************
2 *
3 * video/abc800.c
4 *
5 ****************************************************************************/
6
7/*
8
9   TODO:
10
11   - abc800c
12
13*/
14
15#include "driver.h"
16#include "includes/abc80x.h"
17#include "machine/z80dart.h"
18#include "video/mc6845.h"
19
20/* Character Memory */
21
22READ8_HANDLER( abc800_charram_r )
23{
24   abc800_state *state = space->machine->driver_data;
25
26   return state->charram[offset];
27}
28
29WRITE8_HANDLER( abc800_charram_w )
30{
31   abc800_state *state = space->machine->driver_data;
32
33   state->charram[offset] = data;
34}
35
36/* Palette Initialization */
37
38static PALETTE_INIT( abc800m )
39{
40   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00); // black
41   palette_set_color_rgb(machine, 1, 0xff, 0xff, 0x00); // yellow
42}
43
44static PALETTE_INIT( abc800c )
45{
46   palette_set_color_rgb(machine, 0, 0x00, 0x00, 0x00); // black
47   palette_set_color_rgb(machine, 1, 0x00, 0x00, 0xff); // blue
48   palette_set_color_rgb(machine, 2, 0xff, 0x00, 0x00); // red
49   palette_set_color_rgb(machine, 3, 0xff, 0x00, 0xff); // magenta
50   palette_set_color_rgb(machine, 4, 0x00, 0xff, 0x00); // green
51   palette_set_color_rgb(machine, 5, 0x00, 0xff, 0xff); // cyan
52   palette_set_color_rgb(machine, 6, 0xff, 0xff, 0x00); // yellow
53   palette_set_color_rgb(machine, 7, 0xff, 0xff, 0xff); // white
54}
55
56/* External Interface */
57
58WRITE8_HANDLER( abc800_hrs_w )
59{
60   abc800_state *state = space->machine->driver_data;
61
62   state->hrs = data;
63}
64
65WRITE8_HANDLER( abc800_hrc_w )
66{
67   abc800_state *state = space->machine->driver_data;
68
69   state->fgctl = data;
70}
71
72/* MC6845 Row Update */
73
74static MC6845_UPDATE_ROW( abc800m_update_row )
75{
76   abc800_state *state = device->machine->driver_data;
77
78   int column;
79   
80   /* prevent wraparound */
81   if (y >= 240) return;
82   
83   y += 29;
84
85   for (column = 0; column < x_count; column++)
86   {
87      int bit;
88
89      UINT16 address = (state->charram[(ma + column) & 0x7ff] << 4) | (ra & 0x0f);
90      UINT8 data = (state->char_rom[address & 0x7ff] & 0x3f);
91
92      if (column == cursor_x)
93      {
94         data = 0x3f;
95      }
96
97      data <<= 2;
98
99      for (bit = 0; bit < ABC800_CHAR_WIDTH; bit++)
100      {
101         int x = 115 + (column * ABC800_CHAR_WIDTH) + bit;
102
103         if (BIT(data, 7))
104         {
105            *BITMAP_ADDR16(bitmap, y, x) = 1;
106         }
107
108         data <<= 1;
109      }
110   }
111}
112
113static MC6845_ON_VSYNC_CHANGED(abc800_vsync_changed)
114{
115   abc800_state *state = device->machine->driver_data;
116
117   z80dart_ri_w(state->z80dart, 1, vsync);
118}
119
120/* MC6845 Interfaces */
121
122static const mc6845_interface abc800m_mc6845_interface = {
123   SCREEN_TAG,
124   ABC800_CCLK,
125   ABC800_CHAR_WIDTH,
126   NULL,
127   abc800m_update_row,
128   NULL,
129   NULL,
130   NULL,
131   abc800_vsync_changed
132};
133
134/* ABC 800 C */
135
136static void abc800c_update(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
137{
138}
139
140/* HR */
141
142static void abc800m_hr_update(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
143{
144   abc800_state *state = machine->driver_data;
145
146   UINT16 addr = 0;
147   int sx, y, dot;
148
149   for (y = state->hrs + 29; y < MIN(cliprect->max_y + 1, state->hrs + 29 + 240); y++)
150   {
151      int x = 115;
152
153      for (sx = 0; sx < 64; sx++)
154      {
155         UINT8 data = state->videoram[addr++];
156
157         for (dot = 0; dot < 4; dot++)
158         {
159            UINT16 fgctl_addr = ((state->fgctl & 0x7f) << 2) | ((data >> 6) & 0x03);
160            int color = (state->fgctl_prom[fgctl_addr] & 0x07) ? 1 : 0;
161
162            *BITMAP_ADDR16(bitmap, y, x++) = color;
163            *BITMAP_ADDR16(bitmap, y, x++) = color;
164
165            data <<= 2;
166         }
167      }
168   }
169}
170
171static void abc800c_hr_update(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
172{
173   abc800_state *state = machine->driver_data;
174
175   UINT16 addr = 0;
176   int sx, y, dot;
177
178   for (y = state->hrs; y < MIN(cliprect->max_y + 1, state->hrs + 240); y++)
179   {
180      int x = 0;
181
182      for (sx = 0; sx < 64; sx++)
183      {
184         UINT8 data = state->videoram[addr++];
185
186         for (dot = 0; dot < 4; dot++)
187         {
188            UINT16 fgctl_addr = ((state->fgctl & 0x7f) << 2) | ((data >> 6) & 0x03);
189            int color = state->fgctl_prom[fgctl_addr] & 0x07;
190
191            *BITMAP_ADDR16(bitmap, y, x++) = color;
192
193            data <<= 2;
194         }
195      }
196   }
197}
198
199/* Video Start */
200
201static VIDEO_START( abc800m )
202{
203   abc800_state *state = machine->driver_data;
204   
205   /* allocate memory */
206
207   state->charram = auto_malloc(ABC800M_CHAR_RAM_SIZE);
208
209   /* find devices */
210
211   state->mc6845 = devtag_get_device(machine, MC6845, MC6845_TAG);
212
213   /* find memory regions */
214
215   state->char_rom = memory_region(machine, "chargen");
216   state->fgctl_prom = memory_region(machine, "fgctl");
217
218   /* register for state saving */
219
220   state_save_register_global_pointer(state->charram, ABC800M_CHAR_RAM_SIZE);
221   state_save_register_global_pointer(state->videoram, ABC800_VIDEO_RAM_SIZE);
222
223   state_save_register_global(state->hrs);
224   state_save_register_global(state->fgctl);
225}
226
227static VIDEO_START( abc800c )
228{
229   abc800_state *state = machine->driver_data;
230   
231   /* allocate memory */
232
233   state->charram = auto_malloc(ABC800C_CHAR_RAM_SIZE);
234
235   /* find memory regions */
236
237   state->char_rom = memory_region(machine, "chargen");
238   state->fgctl_prom = memory_region(machine, "fgctl");
239
240   /* register for state saving */
241
242   state_save_register_global_pointer(state->charram, ABC800C_CHAR_RAM_SIZE);
243   state_save_register_global_pointer(state->videoram, ABC800_VIDEO_RAM_SIZE);
244
245   state_save_register_global(state->hrs);
246   state_save_register_global(state->fgctl);
247}
248
249/* Video Update */
250
251static VIDEO_UPDATE( abc800m )
252{
253   abc800_state *state = screen->machine->driver_data;
254
255   /* expand visible area to workaround MC6845 */
256   video_screen_set_visarea(screen, 0, 767, 0, 311);
257
258   /* clear screen */
259   bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
260
261   /* draw HR graphics */
262   abc800m_hr_update(screen->machine, bitmap, cliprect);
263   
264   if (!BIT(state->fgctl, 7))
265   {
266      /* draw text */
267      mc6845_update(state->mc6845, bitmap, cliprect);
268   }
269   
270   return 0;
271}
272
273static VIDEO_UPDATE( abc800c )
274{
275   abc800_state *state = screen->machine->driver_data;
276
277   /* clear screen */
278   bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
279
280   /* draw HR graphics */
281   abc800c_hr_update(screen->machine, bitmap, cliprect);
282   
283   if (!BIT(state->fgctl, 7))
284   {
285      /* draw text */
286      abc800c_update(screen->machine, bitmap, cliprect);
287   }
288   
289   return 0;
290}
291
292/* Machine Drivers */
293
294MACHINE_DRIVER_START( abc800m_video )
295   MDRV_DEVICE_ADD(MC6845_TAG, MC6845)
296   MDRV_DEVICE_CONFIG(abc800m_mc6845_interface)
297
298   MDRV_SCREEN_ADD(SCREEN_TAG, RASTER)
299   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
300
301   MDRV_SCREEN_REFRESH_RATE(60)
302   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
303   MDRV_SCREEN_SIZE(640, 400)
304   MDRV_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1)
305
306   MDRV_PALETTE_LENGTH(2)
307
308   MDRV_PALETTE_INIT(abc800m)
309   MDRV_VIDEO_START(abc800m)
310   MDRV_VIDEO_UPDATE(abc800m)
311MACHINE_DRIVER_END
312
313MACHINE_DRIVER_START( abc800c_video )
314   MDRV_SCREEN_ADD(SCREEN_TAG, RASTER)
315   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
316
317   MDRV_SCREEN_REFRESH_RATE(60)
318   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
319   MDRV_SCREEN_SIZE(640, 400)
320   MDRV_SCREEN_VISIBLE_AREA(0,640-1, 0, 400-1)
321
322   MDRV_PALETTE_LENGTH(8)
323
324   MDRV_PALETTE_INIT(abc800c)
325   MDRV_VIDEO_START(abc800c)
326   MDRV_VIDEO_UPDATE(abc800c)
327MACHINE_DRIVER_END
src/mess/video/thomson.c
r3744r3745
932932      }
933933      while ( y < THOM_BORDER_HEIGHT && thom_border_l[ y ] == -1 );
934934      wrect.max_y = ypos - 1;
935      fillbitmap( bitmap,  border, &wrect );
935      bitmap_fill( bitmap,  &wrect , border);
936936   }
937937
938938   /* left border */
r3744r3745
948948      }
949949      while ( y < yup && thom_border_l[ y ] == -1 );
950950      lrect.max_y = ypos - 1;
951      fillbitmap( bitmap, border, &lrect );
951      bitmap_fill( bitmap, &lrect , border);
952952   }
953953
954954   /* lower border */
r3744r3745
963963         ypos ++ /* += scale */; }
964964      while ( y < ybot && thom_border_l[ y ] == -1 );
965965      wrect.max_y = ypos - 1;
966      fillbitmap( bitmap, border, &wrect );
966      bitmap_fill( bitmap, &wrect , border);
967967   }
968968
969969   /* right border */
r3744r3745
984984      }
985985      while ( y < yup && thom_border_r[ y ] == -1 );
986986      rrect.max_y = ypos - 1;
987      fillbitmap( bitmap, border, &rrect );
987      bitmap_fill( bitmap, &rrect , border);
988988   }
989989
990990   /* active area */
src/mess/video/cgenie.c
r3744r3745
246246   int i, address, offset, cursor, size, code, x, y;
247247    rectangle r;
248248
249   fillbitmap(bitmap, get_black_pen(machine), cliprect);
249   bitmap_fill(bitmap, cliprect, get_black_pen(machine));
250250
251251   if(crt.vertical_displayed || crt.horizontal_displayed)
252252   {
r3744r3745
324324   int i, address, offset, cursor, size, code, x, y;
325325    rectangle r;
326326
327   fillbitmap(tmpbitmap, get_black_pen(machine), cliprect);
328   fillbitmap(dlybitmap, get_black_pen(machine), cliprect);
327   bitmap_fill(tmpbitmap, cliprect, get_black_pen(machine));
328   bitmap_fill(dlybitmap, cliprect, get_black_pen(machine));
329329
330330    if(crt.vertical_displayed || crt.horizontal_displayed)
331331   {
src/mess/video/abc80.c
r3744r3745
234234   rect.min_y = ABC80_VDSTART;
235235   rect.max_y = ABC80_VDSTART + 240 - 1;
236236
237   fillbitmap(bitmap, get_black_pen(screen->machine), cliprect);
237   bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
238238
239239   tilemap_mark_all_tiles_dirty(state->tx_tilemap);
240240   tilemap_draw(bitmap, &rect, state->tx_tilemap, 0, 0);
src/mess/video/x68k.c
r3744r3745
465465         rect.max_y = 512;
466466         if(sys.crtc.reg[21] & 0x01)
467467         {
468            fillbitmap(x68k_gfx_0_bitmap_16,0,&rect);
469            fillbitmap(x68k_gfx_0_bitmap_256,0,&rect);
470            fillbitmap(x68k_gfx_0_bitmap_65536,0,&rect);
468            bitmap_fill(x68k_gfx_0_bitmap_16,&rect,0);
469            bitmap_fill(x68k_gfx_0_bitmap_256,&rect,0);
470            bitmap_fill(x68k_gfx_0_bitmap_65536,&rect,0);
471471         }
472472         if(sys.crtc.reg[21] & 0x02)
473473         {
474            fillbitmap(x68k_gfx_1_bitmap_16,0,&rect);
475            fillbitmap(x68k_gfx_1_bitmap_256,0,&rect);
474            bitmap_fill(x68k_gfx_1_bitmap_16,&rect,0);
475            bitmap_fill(x68k_gfx_1_bitmap_256,&rect,0);
476476         }
477477         if(sys.crtc.reg[21] & 0x04)
478478         {
479            fillbitmap(x68k_gfx_2_bitmap_16,0,&rect);
479            bitmap_fill(x68k_gfx_2_bitmap_16,&rect,0);
480480         }
481481         if(sys.crtc.reg[21] & 0x08)
482482         {
483            fillbitmap(x68k_gfx_3_bitmap_16,0,&rect);
483            bitmap_fill(x68k_gfx_3_bitmap_16,&rect,0);
484484         }
485485         timer_set(ATTOTIME_IN_MSEC(10), NULL, 0x02,x68k_crtc_operation_end);  // time taken to do operation is a complete guess.
486486//         popmessage("CRTC: High-speed gfx screen clear [0x%02x]",sys.crtc.reg[21] & 0x0f);
r3744r3745
10001000   }
10011001//   rect.max_x=sys.crtc.width;
10021002//   rect.max_y=sys.crtc.height;
1003   fillbitmap(bitmap,0,cliprect);
1003   bitmap_fill(bitmap,cliprect,0);
10041004
10051005   rect.min_x=sys.crtc.hbegin;
10061006   rect.min_y=sys.crtc.vbegin;
src/mess/video/tx0.c
r3744r3745
4848   /* set up out bitmaps */
4949   tx0_draw_panel_backdrop(machine, panel_bitmap);
5050
51   fillbitmap(typewriter_bitmap, pen_typewriter_bg, &typewriter_bitmap_bounds);
51   bitmap_fill(typewriter_bitmap, &typewriter_bitmap_bounds, pen_typewriter_bg);
5252
5353   /* initialize CRT */
5454   video_start_crt(pen_crt_num_levels, crt_window_offset_x, crt_window_offset_y, crt_window_width, crt_window_height);
r3744r3745
245245   char buf[3];
246246
247247   /* fill with black */
248   fillbitmap(panel_bitmap, pen_panel_bg, &panel_bitmap_bounds);
248   bitmap_fill(panel_bitmap, &panel_bitmap_bounds, pen_panel_bg);
249249
250250   /* column 1: registers, test accumulator, test buffer, toggle switch storage */
251251   tx0_draw_string(machine, bitmap, "program counter", x_panel_col1b_offset, y_panel_pc_offset, color_panel_caption);
r3744r3745
366366      draw_scanline8(typewriter_bitmap, 0, y, typewriter_window_width, buf, machine->pens, -1);
367367   }
368368
369   fillbitmap(typewriter_bitmap, pen_typewriter_bg, &typewriter_scroll_clear_window);
369   bitmap_fill(typewriter_bitmap, &typewriter_scroll_clear_window, pen_typewriter_bg);
370370}
371371
372372void tx0_typewriter_drawchar(running_machine *machine, int character)
src/mess/video/border.c
r3744r3745
9393         r.max_x = TotalScreenWidth-1;
9494         r.min_y = 0;
9595         r.max_y = TopBorderLines-1;
96         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
96         bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
9797
9898         r.min_x = 0;
9999         r.max_x = LeftBorderPixels-1;
100100         r.min_y = TopBorderLines;
101101         r.max_y = TopBorderLines+ScreenLines-1;
102         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
102         bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
103103
104104         r.min_x = LeftBorderPixels+ScreenPixels;
105105         r.max_x = TotalScreenWidth-1;
106         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
106         bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
107107
108108         r.min_x = 0;
109109         r.max_x = TotalScreenWidth-1;
110110         r.min_y = TopBorderLines+ScreenLines;
111111         r.max_y = TotalScreenHeight-1;
112         fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
112         bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
113113
114114//         logerror ("Setting border colour to %d (Last = %d, Full Refresh = %d)\n", CurrBorderColor, LastDisplayedBorderColor, full_refresh);
115115         LastDisplayedBorderColor = CurrBorderColor;
r3744r3745
137137               {
138138                     /* Single colour on line */
139139                     r.max_x = TotalScreenWidth-1;
140                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
140                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
141141               }
142142               else
143143               {
144144                     /* Multiple colours on a line */
145145                     ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
146146                     r.max_x = ScrX-1;
147                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
147                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
148148                     CurrBorderColor = pItem[CurrItem].Event_Data;
149149                     do {
150150                           CurrItem++;
r3744r3745
155155                           NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
156156                           r.min_x = ScrX;
157157                           r.max_x = NextScrX-1;
158                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
158                           bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
159159                           ScrX = NextScrX;
160160                           CurrBorderColor = pItem[CurrItem].Event_Data;
161161                           do {
r3744r3745
164164                     }
165165                     r.min_x = ScrX;
166166                     r.max_x = TotalScreenWidth-1;
167                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
167                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
168168               }
169169
170170               /* Process colour changes during horizontal retrace */
r3744r3745
189189               {
190190                     /* Single colour */
191191                     r.max_x = LeftBorderPixels-1;
192                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
192                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
193193               }
194194               else
195195               {
196196                     /* Multiple colours */
197197                     ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)LeftBorderPixels / (float)LeftBorderCycles;
198198                     r.max_x = ScrX-1;
199                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
199                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
200200                     CurrBorderColor = pItem[CurrItem].Event_Data;
201201                     do {
202202                           CurrItem++;
r3744r3745
207207                           NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)LeftBorderPixels / (float)LeftBorderCycles;
208208                           r.min_x = ScrX;
209209                           r.max_x = NextScrX-1;
210                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
210                           bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
211211                           ScrX = NextScrX;
212212                           CurrBorderColor = pItem[CurrItem].Event_Data;
213213                           do {
r3744r3745
216216                     }
217217                     r.min_x = ScrX;
218218                     r.max_x = LeftBorderPixels-1;
219                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
219                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
220220               }
221221
222222               /* Process colour changes during screen draw */
r3744r3745
234234               {
235235                     /* Single colour */
236236                     r.max_x = TotalScreenWidth-1;
237                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
237                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
238238               }
239239               else
240240               {
241241                     /* Multiple colours */
242242                     ScrX = LeftBorderPixels + ScreenPixels + (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)RightBorderPixels / (float)RightBorderCycles;
243243                     r.max_x = ScrX-1;
244                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
244                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
245245                     CurrBorderColor = pItem[CurrItem].Event_Data;
246246                     do {
247247                           CurrItem++;
r3744r3745
252252                           NextScrX = LeftBorderPixels + ScreenPixels + (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)RightBorderPixels / (float)RightBorderCycles;
253253                           r.min_x = ScrX;
254254                           r.max_x = NextScrX-1;
255                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
255                           bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
256256                           ScrX = NextScrX;
257257                           CurrBorderColor = pItem[CurrItem].Event_Data;
258258                           do {
r3744r3745
261261                     }
262262                     r.min_x = ScrX;
263263                     r.max_x = TotalScreenWidth-1;
264                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
264                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
265265               }
266266
267267               /* Process colour changes during horizontal retrace */
r3744r3745
284284               {
285285                     /* Single colour on line */
286286                     r.max_x = TotalScreenWidth-1;
287                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
287                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
288288               }
289289               else
290290               {
291291                     /* Multiple colours on a line */
292292                     ScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
293293                     r.max_x = ScrX-1;
294                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
294                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
295295                     CurrBorderColor = pItem[CurrItem].Event_Data;
296296                     do {
297297                           CurrItem++;
r3744r3745
302302                           NextScrX = (int)(pItem[CurrItem].Event_Time - CyclesSoFar) * (float)TotalScreenWidth / (float)DisplayCyclesPerLine;
303303                           r.min_x = ScrX;
304304                           r.max_x = NextScrX-1;
305                           fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
305                           bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
306306                           ScrX = NextScrX;
307307                           CurrBorderColor = pItem[CurrItem].Event_Data;
308308                           do {
r3744r3745
311311                     }
312312                     r.min_x = ScrX;
313313                     r.max_x = TotalScreenWidth-1;
314                     fillbitmap(bitmap, machine->pens[CurrBorderColor], &r);
314                     bitmap_fill(bitmap, &r, machine->pens[CurrBorderColor]);
315315               }
316316
317317               /* Process colour changes during horizontal retrace */
src/mess/video/pc_video.c
r3744r3745
103103         if ((pc_current_width > 100) && (pc_current_height > 100))
104104            video_screen_set_visarea(screen, 0, pc_current_width-1, 0, pc_current_height-1);
105105
106         fillbitmap(bitmap, 0, cliprect);
106         bitmap_fill(bitmap, cliprect, 0);
107107      }
108108
109109      video_update(tmpbitmap ? tmpbitmap : bitmap, pc_crtc);
src/mess/video/pcw.c
r3744r3745
7575      rect.min_y = 0;
7676      rect.max_x = PCW_SCREEN_WIDTH;
7777      rect.max_y = PCW_BORDER_HEIGHT;
78      fillbitmap(bitmap, pen0, &rect);
78      bitmap_fill(bitmap, &rect, pen0);
7979
8080      /* render bottom border */
8181      rect.min_x = 0;
8282      rect.min_y = PCW_BORDER_HEIGHT + PCW_DISPLAY_HEIGHT;
8383      rect.max_x = PCW_SCREEN_WIDTH;
8484      rect.max_y = rect.min_y + PCW_BORDER_HEIGHT;
85      fillbitmap(bitmap, pen0, &rect);
85      bitmap_fill(bitmap, &rect, pen0);
8686
8787      /* yes */
8888
r3744r3745
172172      rect.max_x = PCW_SCREEN_WIDTH;
173173      rect.max_y = PCW_SCREEN_HEIGHT;
174174
175      fillbitmap(bitmap, pen0, &rect);
175      bitmap_fill(bitmap, &rect, pen0);
176176   }
177177   return 0;
178178}
src/mess/video/vic4567.c
r3744r3745
756756      vis.max_x = XPOS-1;
757757      vis.min_y = 0;
758758      vis.max_y = visarea->max_y;
759      fillbitmap(vic2.bitmap, FRAMECOLOR,&vis);
759      bitmap_fill(vic2.bitmap, &vis,FRAMECOLOR);
760760   }
761761   if (XPOS+VIC3_BITPLANES_WIDTH<visarea->max_x) {
762762      vis.min_x = XPOS+VIC3_BITPLANES_WIDTH;
763763      vis.max_x = visarea->max_x;
764764      vis.min_y = 0;
765765      vis.max_y = visarea->max_y;
766      fillbitmap(vic2.bitmap, FRAMECOLOR,&vis);
766      bitmap_fill(vic2.bitmap, &vis,FRAMECOLOR);
767767   }
768768   if (YPOS>0)
769769   {
r3744r3745
771771      vis.max_y = YPOS-1;
772772      vis.min_x = 0;
773773      vis.max_x = visarea->max_x;
774      fillbitmap(vic2.bitmap, FRAMECOLOR,&vis);
774      bitmap_fill(vic2.bitmap, &vis,FRAMECOLOR);
775775   }
776776   if (YPOS+VIC3_LINES<visarea->max_y) {
777777      vis.min_y = YPOS+VIC3_LINES;
778778      vis.max_y = visarea->max_y;
779779      vis.min_x = 0;
780780      vis.max_x = visarea->max_x;
781      fillbitmap(vic2.bitmap, FRAMECOLOR,&vis);
781      bitmap_fill(vic2.bitmap, &vis,FRAMECOLOR);
782782   }
783783}
784784
src/mess/video/vector06.c
r3744r3745
2323   int width = (vector_video_mode==0x00) ? 256 : 512;     
2424   rectangle screen_area = {0,width+64-1,0,256+64-1};
2525   // fill border color
26   fillbitmap(bitmap, vector_color_index, &screen_area);
26   bitmap_fill(bitmap, &screen_area, vector_color_index);
2727
2828   // draw image
2929   for (x = 0; x < 32; x++)
src/mess/video/electron.c
r3744r3745
139139      break;
140140   case 3:
141141      if ( ( scanline > 249 ) || ( scanline % 10 >= 8 ) )
142         fillbitmap( bitmap, 7, &r );
142         bitmap_fill( bitmap, &r , 7);
143143      else
144144      {
145145         for( i = 0; i < 80; i++ )
r3744r3745
212212      break;
213213   case 6:
214214      if ( ( scanline > 249 ) || ( scanline % 10 >= 8 ) ) {
215         fillbitmap( bitmap, 7, &r );
215         bitmap_fill( bitmap, &r , 7);
216216      } else {
217217         for( i = 0; i < 40; i++ ) {
218218            UINT8 pattern = read_vram( ula.screen_addr + i * 8 );
src/mess/video/zx8301.c
r3744r3745
222222   }
223223   else
224224   {
225      fillbitmap(bitmap, get_black_pen(zx8301->screen->machine), cliprect);
225      bitmap_fill(bitmap, cliprect, get_black_pen(zx8301->screen->machine));
226226   }
227227}
228228
src/mess/video/smsvdp.c
r3744r3745
280280      /* Draw left border */
281281      rec.min_x = LBORDER_START;
282282      rec.max_x = LBORDER_START + LBORDER_X_PIXELS - 1;
283      fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec );
283      bitmap_fill( tmpbitmap, &rec , machine->pens[smsvdp.current_palette[BACKDROP_COLOR]]);
284284      /* Draw right border */
285285      rec.min_x = LBORDER_START + LBORDER_X_PIXELS + 256;
286286      rec.max_x = rec.min_x + RBORDER_X_PIXELS - 1;
287      fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec );
287      bitmap_fill( tmpbitmap, &rec , machine->pens[smsvdp.current_palette[BACKDROP_COLOR]]);
288288      /* Draw middle of the border */
289289      /* We need to do this through the regular drawing function so it will */
290290      /* be included in the gamegear scaling functions */
r3744r3745
320320         /* set whole line to backdrop color */
321321         rec.min_x = LBORDER_START;
322322         rec.max_x = LBORDER_START + LBORDER_X_PIXELS + 255 + RBORDER_X_PIXELS;
323         fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec );
323         bitmap_fill( tmpbitmap, &rec , machine->pens[smsvdp.current_palette[BACKDROP_COLOR]]);
324324      } else {
325325         /* Draw left border */
326326         rec.min_x = LBORDER_START;
327327         rec.max_x = LBORDER_START + LBORDER_X_PIXELS - 1;
328         fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec );
328         bitmap_fill( tmpbitmap, &rec , machine->pens[smsvdp.current_palette[BACKDROP_COLOR]]);
329329         /* Draw right border */
330330         rec.min_x = LBORDER_START + LBORDER_X_PIXELS + 256;
331331         rec.max_x = rec.min_x + RBORDER_X_PIXELS - 1;
332         fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec );
332         bitmap_fill( tmpbitmap, &rec , machine->pens[smsvdp.current_palette[BACKDROP_COLOR]]);
333333         sms_refresh_line( machine, tmpbitmap, LBORDER_START + LBORDER_X_PIXELS, vpos_limit, vpos - vpos_limit );
334334      }
335335      return;
r3744r3745
346346      /* Draw left border */
347347      rec.min_x = LBORDER_START;
348348      rec.max_x = LBORDER_START + LBORDER_X_PIXELS - 1;
349      fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec );
349      bitmap_fill( tmpbitmap, &rec , machine->pens[smsvdp.current_palette[BACKDROP_COLOR]]);
350350      /* Draw right border */
351351      rec.min_x = LBORDER_START + LBORDER_X_PIXELS + 256;
352352      rec.max_x = rec.min_x + RBORDER_X_PIXELS - 1;
353      fillbitmap( tmpbitmap, machine->pens[smsvdp.current_palette[BACKDROP_COLOR]], &rec );
353      bitmap_fill( tmpbitmap, &rec , machine->pens[smsvdp.current_palette[BACKDROP_COLOR]]);
354354      /* Draw middle of the border */
355355      /* We need to do this through the regular drawing function so it will */
356356      /* be included in the gamegear scaling functions */
src/mess/video/msm6255.c
r3744r3745
335335   }
336336   else
337337   {
338      fillbitmap(bitmap, get_black_pen(device->machine), cliprect);
338      bitmap_fill(bitmap, cliprect, get_black_pen(device->machine));
339339   }
340340}
341341
src/mess/video/intv.c
r3744r3745
725725   else
726726   {
727727      /* STIC disabled, just fill with border color */
728      fillbitmap(tmpbitmap, (intv_border_color<<1)+1, NULL);
728      bitmap_fill(tmpbitmap, NULL, (intv_border_color<<1)+1);
729729   }
730730   col_delay = intv_col_delay;
731731   row_delay = intv_row_delay;
src/mess/video/cdp1864.c
r3744r3745
342342   if (cdp1864->disp)
343343   {
344344      copybitmap(bitmap, cdp1864->bitmap, 0, 0, 0, 0, cliprect);
345      fillbitmap(cdp1864->bitmap, CDP1864_BACKGROUND_COLOR_SEQUENCE[cdp1864->bgcolor] + 8, cliprect);
345      bitmap_fill(cdp1864->bitmap, cliprect, CDP1864_BACKGROUND_COLOR_SEQUENCE[cdp1864->bgcolor] + 8);
346346   }
347347   else
348348   {
349      fillbitmap(bitmap, get_black_pen(device->machine), cliprect);
349      bitmap_fill(bitmap, cliprect, get_black_pen(device->machine));
350350   }
351351}
352352
r3744r3745
375375
376376   /* allocate the temporary bitmap */
377377   cdp1864->bitmap = auto_bitmap_alloc(video_screen_get_width(cdp1864->screen), video_screen_get_height(cdp1864->screen), video_screen_get_format(cdp1864->screen));
378   fillbitmap(cdp1864->bitmap, CDP1864_BACKGROUND_COLOR_SEQUENCE[cdp1864->bgcolor] + 8, 0);
378   bitmap_fill(cdp1864->bitmap, 0, CDP1864_BACKGROUND_COLOR_SEQUENCE[cdp1864->bgcolor] + 8);
379379
380380   /* initialize the palette */
381381   cdp1864_init_palette(device);
src/mess/video/samcoupe.c
r3744r3745
168168   if ((asic->vmpr & 0x40) && (asic->border & 0x80))
169169   {
170170      /* display is disabled, draw a black screen */
171      fillbitmap(bitmap, 0, cliprect);
171      bitmap_fill(bitmap, cliprect, 0);
172172   }
173173   else
174174   {
src/mess/video/odyssey2.c
r3744r3745
305305      rect.min_y = rect.max_y = vpos;
306306      rect.min_x = I824X_START_ACTIVE_SCAN;
307307      rect.max_x = I824X_END_ACTIVE_SCAN - 1;
308      fillbitmap( tmp_bitmap, ( (o2_vdc.s.color >> 3) & 0x7 ) | ( ( lum << 3 ) ^ 0x08 ), &rect );
308      bitmap_fill( tmp_bitmap, &rect , ( (o2_vdc.s.color >> 3) & 0x7 ) | ( ( lum << 3 ) ^ 0x08 ));
309309
310310      /* Clear collision map */
311311      memset( collision_map, 0, sizeof( collision_map ) );
src/mess/video/abc806.c
r3744r3745
485485   video_screen_set_visarea(screen, 0, 767, 0, 311);
486486
487487   /* clear screen */
488   fillbitmap(bitmap, 0, cliprect);
488   bitmap_fill(bitmap, cliprect, 0);
489489   
490490   if (!state->txoff)
491491   {
src/mess/video/hd66421.c
r3744r3745
177177      rect.max_x = HD66421_WIDTH - 1;
178178      rect.min_y = 0;
179179      rect.max_y = HD66421_HEIGHT - 1;
180      fillbitmap( bitmap, get_white_pen(screen->machine), &rect);
180      bitmap_fill( bitmap, &rect, get_white_pen(screen->machine));
181181   }
182182   // flags
183183   return 0;
src/mess/video/733_asr.c
r3744r3745
176176
177177   asr[unit].bitmap = auto_bitmap_alloc(width, height, BITMAP_FORMAT_INDEXED16);
178178
179   fillbitmap(asr[unit].bitmap, 0, visarea);
179   bitmap_fill(asr[unit].bitmap, visarea, 0);
180180
181181   asr[unit].int_callback = int_callback;
182182
r3744r3745
227227      draw_scanline8(asr[unit].bitmap, asr_window_offset_x, y, asr_window_width, buf, machine->pens, -1);
228228   }
229229
230   fillbitmap(asr[unit].bitmap, 0, &asr_scroll_clear_window);
230   bitmap_fill(asr[unit].bitmap, &asr_scroll_clear_window, 0);
231231}
232232
233233static void asr_transmit(running_machine *machine, int unit, UINT8 data)
src/mess/video/galaxy.c
r3744r3745
9999   timer_adjust_periodic(gal_video_timer, attotime_zero, 0, attotime_never);
100100   if (galaxy_interrupts_enabled == FALSE) {
101101      rectangle black_area = {0,384-1,0,208-1};
102      fillbitmap(tmpbitmap, 0, &black_area);
102      bitmap_fill(tmpbitmap, &black_area, 0);
103103   }
104104   galaxy_interrupts_enabled = FALSE;
105105   return VIDEO_UPDATE_CALL ( generic_bitmapped );
src/mess/video/cdp1861.c
r3744r3745
178178   }
179179   else
180180   {
181      fillbitmap(bitmap, get_black_pen(device->machine), cliprect);
181      bitmap_fill(bitmap, cliprect, get_black_pen(device->machine));
182182   }
183183}
184184
src/mess/video/vtech2.c
r3744r3745
127127   int full_refresh = 1;
128128
129129   if( full_refresh )
130      fillbitmap(bitmap, ((laser_bg_mode >> 4) & 15)<<1, cliprect);
130      bitmap_fill(bitmap, cliprect, ((laser_bg_mode >> 4) & 15)<<1);
131131
132132   if (laser_latch & 0x08)
133133   {
src/mess/drivers/apexc.c
r3744r3745
494494   int width = video_screen_get_width(screen);
495495   int height = video_screen_get_height(screen);
496496   apexc_bitmap = auto_bitmap_alloc(width, height, BITMAP_FORMAT_INDEXED16);
497   fillbitmap(apexc_bitmap, 0, &/*machine->visible_area*/teletyper_window);
497   bitmap_fill(apexc_bitmap, &/*machine->visible_area*/teletyper_window, 0);
498498}
499499
500500/* draw a small 8*8 LED (well, there were no LEDs at the time, so let's call this a lamp ;-) ) */
r3744r3745
532532   int i;
533533   char the_char;
534534
535   fillbitmap(bitmap, 0, &/*machine->visible_area*/panel_window);
535   bitmap_fill(bitmap, &/*machine->visible_area*/panel_window, 0);
536536   apexc_draw_string(screen->machine, bitmap, "power", 8, 0, 0);
537537   apexc_draw_string(screen->machine, bitmap, "running", 8, 8, 0);
538538   apexc_draw_string(screen->machine, bitmap, "data :", 0, 24, 0);
r3744r3745
578578      draw_scanline8(apexc_bitmap, teletyper_window_offset_x, y, teletyper_window_width, buf, machine->pens, -1);
579579   }
580580
581   fillbitmap(apexc_bitmap, 0, &teletyper_scroll_clear_window);
581   bitmap_fill(apexc_bitmap, &teletyper_scroll_clear_window, 0);
582582}
583583
584584static void apexc_teletyper_putchar(running_machine *machine, int character)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team