1 |
/* |
/* |
2 |
* Copyright (C) 2004-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2004-2007 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_vga.c,v 1.99 2006/06/16 18:31:26 debug Exp $ |
* $Id: dev_vga.c,v 1.101 2006/12/30 13:30:59 debug Exp $ |
29 |
* |
* |
30 |
* VGA charcell and graphics device. |
* VGA charcell and graphics device. |
31 |
* |
* |
763 |
static void vga_crtc_reg_write(struct machine *machine, struct vga_data *d, |
static void vga_crtc_reg_write(struct machine *machine, struct vga_data *d, |
764 |
int regnr, int idata) |
int regnr, int idata) |
765 |
{ |
{ |
766 |
int grayscale; |
int i, grayscale; |
767 |
|
|
768 |
switch (regnr) { |
switch (regnr) { |
769 |
case VGA_CRTC_CURSOR_SCANLINE_START: /* 0x0a */ |
case VGA_CRTC_CURSOR_SCANLINE_START: /* 0x0a */ |
872 |
d->max_y * d->pixel_repy * 3; |
d->max_y * d->pixel_repy * 3; |
873 |
} |
} |
874 |
|
|
875 |
|
for (i=0; i<machine->ncpus; i++) |
876 |
|
machine->cpus[i]->invalidate_translation_caches( |
877 |
|
machine->cpus[i], 0, INVALIDATE_ALL); |
878 |
|
|
879 |
if (d->gfx_mem != NULL) |
if (d->gfx_mem != NULL) |
880 |
free(d->gfx_mem); |
free(d->gfx_mem); |
881 |
d->gfx_mem_size = 1; |
d->gfx_mem_size = 1; |