Previous 15994 Revisions Next

r1921 Tuesday 11th March, 2008 at 20:27:56 UTC by Wilbert Pol
Removed deprecat.h dependency from video/vdc8563.c
[src/mess/video]vdc8563.c

src/mess/video/vdc8563.c
r1920r1921
1515#include <stdio.h>
1616#include <assert.h>
1717#include "driver.h"
18#include "deprecat.h"
1918
2019#include "includes/crtc6845.h" // include only several register defines
2120#include "vdc8563.h"
r1920r1921
402401   }
403402}
404403
405static void vdc8563_monotext_screenrefresh (bitmap_t *bitmap, int full_refresh)
404static void vdc8563_monotext_screenrefresh (running_machine *machine, bitmap_t *bitmap, int full_refresh)
406405{
407406   int x, y, i;
408407   rectangle rect;
r1920r1921
410409   int h=CRTC6845_CHAR_LINES;
411410   int height=CRTC6845_CHAR_HEIGHT;
412411
413   rect.min_x=Machine->screen[0].visarea.min_x;
414   rect.max_x=Machine->screen[0].visarea.max_x;
412   rect.min_x=machine->screen[0].visarea.min_x;
413   rect.max_x=machine->screen[0].visarea.max_x;
415414   if (full_refresh) {
416415      memset(vdc.dirty+vdc.videoram_start, 1, vdc.videoram_size);
417416   }
r1920r1921
421420       y++, rect.min_y+=height, rect.max_y+=height) {
422421      for (x=0; x<w; x++, i=(i+1)&vdc.mask) {
423422         if (vdc.dirty[i]) {
424            drawgfx(bitmap,Machine->gfx[0],
423            drawgfx(bitmap,machine->gfx[0],
425424                  vdc.ram[i], FRAMECOLOR|(MONOCOLOR<<4), 0, 0,
426                  Machine->gfx[0]->width*x+8,height*y+height,
425                  machine->gfx[0]->width*x+8,height*y+height,
427426                  &rect,TRANSPARENCY_NONE,0);
428427            if ((vdc.cursor_on)&&(i==(CRTC6845_CURSOR_POS&vdc.mask))) {
429428               int k=height-CRTC6845_CURSOR_TOP;
430429               if (CRTC6845_CURSOR_BOTTOM<height) k=CRTC6845_CURSOR_BOTTOM-CRTC6845_CURSOR_TOP+1;
431430
432431               if (k>0)
433                  plot_box(bitmap, Machine->gfx[0]->width*x+8,
432                  plot_box(bitmap, machine->gfx[0]->width*x+8,
434433                         height*y+height+CRTC6845_CURSOR_TOP,
435                         Machine->gfx[0]->width, k, Machine->pens[FRAMECOLOR]);
434                         machine->gfx[0]->width, k, machine->pens[FRAMECOLOR]);
436435            }
437436
438437            vdc.dirty[i]=0;
r1920r1921
442441   }
443442}
444443
445static void vdc8563_text_screenrefresh (bitmap_t *bitmap, int full_refresh)
444static void vdc8563_text_screenrefresh (running_machine *machine, bitmap_t *bitmap, int full_refresh)
446445{
447446   int x, y, i, j;
448447   rectangle rect;
r1920r1921
450449   int h=CRTC6845_CHAR_LINES;
451450   int height=CRTC6845_CHAR_HEIGHT;
452451
453   rect.min_x=Machine->screen[0].visarea.min_x;
454   rect.max_x=Machine->screen[0].visarea.max_x;
452   rect.min_x=machine->screen[0].visarea.min_x;
453   rect.max_x=machine->screen[0].visarea.max_x;
455454   if (full_refresh) {
456455      memset(vdc.dirty+vdc.videoram_start, 1, vdc.videoram_size);
457456   }
r1920r1921
488487               if (CRTC6845_CURSOR_BOTTOM<height) k=CRTC6845_CURSOR_BOTTOM-CRTC6845_CURSOR_TOP+1;
489488
490489               if (k>0)
491                  plot_box(bitmap, Machine->gfx[0]->width*x+8,
490                  plot_box(bitmap, machine->gfx[0]->width*x+8,
492491                         height*y+height+CRTC6845_CURSOR_TOP,
493                         Machine->gfx[0]->width, k, Machine->pens[0x10|(vdc.ram[j]&0xf)]);
492                         machine->gfx[0]->width, k, machine->pens[0x10|(vdc.ram[j]&0xf)]);
494493            }
495494
496495            vdc.dirty[i]=0;
r1920r1921
502501   }
503502}
504503
505static void vdc8563_graphic_screenrefresh (bitmap_t *bitmap, int full_refresh)
504static void vdc8563_graphic_screenrefresh (running_machine *machine, bitmap_t *bitmap, int full_refresh)
506505{
507506   int x, y, i, j, k;
508507   rectangle rect;
r1920r1921
510509   int h=CRTC6845_CHAR_LINES;
511510   int height=CRTC6845_CHAR_HEIGHT;
512511
513   rect.min_x=Machine->screen[0].visarea.min_x;
514   rect.max_x=Machine->screen[0].visarea.max_x;
512   rect.min_x=machine->screen[0].visarea.min_x;
513   rect.max_x=machine->screen[0].visarea.max_x;
515514   if (full_refresh) {
516515      memset(vdc.dirty, 1, vdc.mask+1);
517516   }
r1920r1921
523522         for (j=0; j<height; j++) {
524523            k=((i<<4)+j)&vdc.mask;
525524            if (vdc.dirty[k]) {
526               drawgfx(bitmap,Machine->gfx[1],
525               drawgfx(bitmap,machine->gfx[1],
527526                     vdc.ram[k], FRAMECOLOR|(MONOCOLOR<<4), 0, 0,
528                     Machine->gfx[0]->width*x+8,height*y+height+j,
527                     machine->gfx[0]->width*x+8,height*y+height+j,
529528                     &rect,TRANSPARENCY_NONE,0);
530529               vdc.dirty[k]=0;
531530            }
r1920r1921
544543   vdc8563_time();
545544
546545   full_refresh|=vdc.changed;
547   if (GRAPHIC) { vdc8563_graphic_screenrefresh(bitmap, full_refresh);
546   if (GRAPHIC) { vdc8563_graphic_screenrefresh(machine, bitmap, full_refresh);
548547   } else {
549548      for (i=0; i<512; i++) {
550549         if (full_refresh||vdc.fontdirty[i]) {
r1920r1921
552551            vdc.fontdirty[i]=0;
553552         }
554553      }
555      if (TEXT) vdc8563_text_screenrefresh(bitmap, full_refresh);
556      else vdc8563_monotext_screenrefresh(bitmap, full_refresh);
554      if (TEXT) vdc8563_text_screenrefresh(machine, bitmap, full_refresh);
555      else vdc8563_monotext_screenrefresh(machine, bitmap, full_refresh);
557556   }
558557
559558   if (full_refresh) {

Previous 15994 Revisions Next


© 1998-2018 The MESS Team