DevVGA.h revision ba05813125d3f350e4805cde3b222b088ec759cd
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * DevVGA - VBox VGA/VESA device, internal header.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * available from http://www.virtualbox.org. This file is free software;
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * you can redistribute it and/or modify it under the terms of the GNU
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * General Public License (GPL) as published by the Free Software
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * additional information or have any questions.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * --------------------------------------------------------------------
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * This code is based on:
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * QEMU internal VGA defines.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * Copyright (c) 2003-2004 Fabrice Bellard
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * Permission is hereby granted, free of charge, to any person obtaining a copy
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * of this software and associated documentation files (the "Software"), to deal
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * in the Software without restriction, including without limitation the rights
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * copies of the Software, and to permit persons to whom the Software is
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * furnished to do so, subject to the following conditions:
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * The above copyright notice and this permission notice shall be included in
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * all copies or substantial portions of the Software.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync * THE SOFTWARE.
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#endif /* VBOX_WITH_HGSMI */
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync/* bochs VBE support */
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync/* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_VBOX_VIDEO. */
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync/* The VBOX interface id. Indicates support for VBVA shared memory interface. */
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#endif /* VBOX_WITH_HGSMI */
a260560bdbc7bd737d59547882cd5e8d77b80d0avboxsync#endif /* VBOX */
#ifndef VBOX
#define VGA_STATE_COMMON \
unsigned long vram_offset; \
unsigned int vram_size; \
int ar_flip_flop; \
int *pwidth, \
int *pheight); \
int graphic_mode; \
unsigned int (*rgb_to_pixel)(unsigned int r, \
struct VGAState;
typedef void FNGETOFFSETS(struct VGAState *s, uint32_t *pline_offset, uint32_t *pstart_addr, uint32_t *pline_compare);
typedef unsigned int FNRGBTOPIXEL(unsigned int r, unsigned int g, unsigned b);
#define VGA_STATE_COMMON \
typedef struct VGAState {
#ifdef VBOX
bool fLFBUpdated;
bool fGCEnabled;
bool fR0Enabled;
bool fHasDirtyBits;
/** Flag indicating that the VGA memory in the 0xa0000-0xbffff region has been remapped to allow direct access. */
bool fRemappedVGA;
bool fRenderVRAM;
#ifdef VBOX_WITH_HGSMI
#ifdef VBE_BYTEWISE_IO
# ifdef VBE_NEW_DYN_LIST
#ifdef VBE_NEW_DYN_LIST
#ifdef VBOX_WITH_HGSMI
} VGAState;
#ifdef VBOX
#ifdef VBE_NEW_DYN_LIST
* @remark duplicated in vbe.h.
typedef struct VBEHeader
} VBEHeader;
* @remark duplicated in vbe.h. */
* @remark duplicated in vbe.h. */
* @remark duplicated in vbe.h. */
static inline int c6_to_8(int v)
#ifdef VBOX_WITH_HGSMI
# ifdef VBOX_WITH_VIDEOHWACCEL
#ifndef VBOX
int poffset, int w,
unsigned int color_xor);
int poffset, int w,
unsigned int color_xor);
int poffset, int w,
unsigned int color_xor);