static void vmsvga_reset(struct vmsvga_state_s *s)

{

    s->index = 0;

    s->enable = 0;

    s->config = 0;

    s->width = -1;

    s->height = -1;

    s->svgaid = SVGA_ID;

    s->depth = 24;

    s->bypp = (s->depth + 7) >> 3;

    s->cursor.on = 0;

    s->redraw_fifo_first = 0;

    s->redraw_fifo_last = 0;

    switch (s->depth) {

    case 8:

        s->wred   = 0x00000007;

        s->wgreen = 0x00000038;

        s->wblue  = 0x000000c0;

        break;

    case 15:

        s->wred   = 0x0000001f;

        s->wgreen = 0x000003e0;

        s->wblue  = 0x00007c00;

        break;

    case 16:

        s->wred   = 0x0000001f;

        s->wgreen = 0x000007e0;

        s->wblue  = 0x0000f800;

        break;

    case 24:

        s->wred   = 0x00ff0000;

        s->wgreen = 0x0000ff00;

        s->wblue  = 0x000000ff;

        break;

    case 32:

        s->wred   = 0x00ff0000;

        s->wgreen = 0x0000ff00;

        s->wblue  = 0x000000ff;

        break;

    }

    s->syncing = 0;

}

static void vmsvga_reset(struct vmsvga_state_s *s)

{

    s->index = 0;

    s->enable = 0;

    s->config = 0;

    s->width = -1;

    s->height = -1;

    s->svgaid = SVGA_ID;

    s->depth = 24;

    s->bypp = (s->depth + 7) >> 3;

    s->cursor.on = 0;

    s->redraw_fifo_first = 0;

    s->redraw_fifo_last = 0;

    switch (s->depth) {

    case 8:

        s->wred   = 0x00000007;

        s->wgreen = 0x00000038;

        s->wblue  = 0x000000c0;

        break;

    case 15:

        s->wred   = 0x0000001f;

        s->wgreen = 0x000003e0;

        s->wblue  = 0x00007c00;

        break;

    case 16:

        s->wred   = 0x0000001f;

        s->wgreen = 0x000007e0;

        s->wblue  = 0x0000f800;

        break;

    case 24:

        s->wred   = 0x00ff0000;

        s->wgreen = 0x0000ff00;

        s->wblue  = 0x000000ff;

        break;

    case 32:

        s->wred   = 0x00ff0000;

        s->wgreen = 0x0000ff00;

        s->wblue  = 0x000000ff;

        break;

    }

    s->syncing = 0;

}

    s->depth = 24;     s->bypp = (s->depth + 7) >> 3;
static void FUNC_0(struct vmsvga_state_s *VAR_0)

{

    VAR_0->index = 0;

    VAR_0->enable = 0;

    VAR_0->config = 0;

    VAR_0->width = -1;

    VAR_0->height = -1;

    VAR_0->svgaid = SVGA_ID;

    VAR_0->depth = 24;

    VAR_0->bypp = (VAR_0->depth + 7) >> 3;

    VAR_0->cursor.on = 0;

    VAR_0->redraw_fifo_first = 0;

    VAR_0->redraw_fifo_last = 0;

    switch (VAR_0->depth) {

    case 8:

        VAR_0->wred   = 0x00000007;

        VAR_0->wgreen = 0x00000038;

        VAR_0->wblue  = 0x000000c0;

        break;

    case 15:

        VAR_0->wred   = 0x0000001f;

        VAR_0->wgreen = 0x000003e0;

        VAR_0->wblue  = 0x00007c00;

        break;

    case 16:

        VAR_0->wred   = 0x0000001f;

        VAR_0->wgreen = 0x000007e0;

        VAR_0->wblue  = 0x0000f800;

        break;

    case 24:

        VAR_0->wred   = 0x00ff0000;

        VAR_0->wgreen = 0x0000ff00;

        VAR_0->wblue  = 0x000000ff;

        break;

    case 32:

        VAR_0->wred   = 0x00ff0000;

        VAR_0->wgreen = 0x0000ff00;

        VAR_0->wblue  = 0x000000ff;

        break;

    }

    VAR_0->syncing = 0;

}

static void FUNC_0(struct vmsvga_state_s *VAR_0)
{ VAR_0->index = 0; VAR_0->enable = 0; VAR_0->config = 0; VAR_0->width = -1; VAR_0->height = -1; VAR_0->svgaid = SVGA_ID; VAR_0->depth = 24; VAR_0->bypp = (VAR_0->depth + 7) >> 3; VAR_0->cursor.on = 0; VAR_0->redraw_fifo_first = 0; VAR_0->redraw_fifo_last = 0; switch (VAR_0->depth) { case 8:
VAR_0->wred   = 0x00000007; VAR_0->wgreen = 0x00000038; VAR_0->wblue  = 0x000000c0; break; case 15:
VAR_0->wred   = 0x0000001f; VAR_0->wgreen = 0x000003e0; VAR_0->wblue  = 0x00007c00; break; case 16:
VAR_0->wred   = 0x0000001f; VAR_0->wgreen = 0x000007e0; VAR_0->wblue  = 0x0000f800; break; case 24:
VAR_0->wred   = 0x00ff0000; VAR_0->wgreen = 0x0000ff00; VAR_0->wblue  = 0x000000ff; break; case 32:
VAR_0->wred   = 0x00ff0000; VAR_0->wgreen = 0x0000ff00; VAR_0->wblue  = 0x000000ff; break; } VAR_0->syncing = 0; }