*
***************************************/
-static void cirrus_get_offsets(VGAState *s1,
+static void cirrus_get_offsets(VGACommonState *s1,
uint32_t *pline_offset,
uint32_t *pstart_addr,
uint32_t *pline_compare)
return ret;
}
-static int cirrus_get_bpp(VGAState *s1)
+static int cirrus_get_bpp(VGACommonState *s1)
{
CirrusVGAState * s = container_of(s1, CirrusVGAState, vga);
uint32_t ret = 8;
return ret;
}
-static void cirrus_get_resolution(VGAState *s, int *pwidth, int *pheight)
+static void cirrus_get_resolution(VGACommonState *s, int *pwidth, int *pheight)
{
int width, height;
/* NOTE: we do not currently handle the cursor bitmap change, so we
update the cursor only if it moves. */
-static void cirrus_cursor_invalidate(VGAState *s1)
+static void cirrus_cursor_invalidate(VGACommonState *s1)
{
CirrusVGAState *s = container_of(s1, CirrusVGAState, vga);
int size;
}
}
-static void cirrus_cursor_draw_line(VGAState *s1, uint8_t *d1, int scr_y)
+static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
{
CirrusVGAState *s = container_of(s1, CirrusVGAState, vga);
int w, h, bpp, x1, x2, poffset;
static uint16_t expand2[256];
static uint8_t expand4to8[16];
+typedef VGACommonState VGAState;
+
static void vga_screen_dump(void *opaque, const char *filename);
static char *screen_dump_filename;
static DisplayChangeListener *screen_dump_dcl;
}
}
-void vga_common_init(VGAState *s, int vga_ram_size)
+void vga_common_init(VGACommonState *s, int vga_ram_size)
{
int i, j, v, b;
union vga_retrace retrace_info;
} VGACommonState;
-typedef VGACommonState VGAState;
-
static inline int c6_to_8(int v)
{
int b;
return (v << 2) | (b << 1) | b;
}
-void vga_common_init(VGAState *s, int vga_ram_size);
-void vga_init(VGAState *s);
+void vga_common_init(VGACommonState *s, int vga_ram_size);
+void vga_init(VGACommonState *s);
void vga_common_reset(VGACommonState *s);
-void vga_dirty_log_start(VGAState *s);
+void vga_dirty_log_start(VGACommonState *s);
uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr);
void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val);
-void vga_invalidate_scanlines(VGAState *s, int y1, int y2);
+void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2);
int ppm_save(const char *filename, struct DisplaySurface *ds);
void vga_draw_cursor_line_8(uint8_t *d1, const uint8_t *src1,
vmsvga_reset(s);
#ifdef EMBED_STDVGA
- vga_common_init((VGAState *) s, vga_ram_size);
- vga_init((VGAState *) s);
+ vga_common_init(&s->vga, vga_ram_size);
+ vga_init(&s->vga);
#else
s->vram_size = vga_ram_size;
s->vram_offset = qemu_ram_alloc(vga_ram_size);