Revision a8aa669b hw/vga_int.h
b/hw/vga_int.h | ||
---|---|---|
72 | 72 |
#endif /* !CONFIG_BOCHS_VBE */ |
73 | 73 |
|
74 | 74 |
#define CH_ATTR_SIZE (160 * 100) |
75 |
#define VGA_MAX_HEIGHT 1024 |
|
75 | 76 |
|
76 | 77 |
#define VGA_STATE_COMMON \ |
77 | 78 |
uint8_t *vram_ptr; \ |
... | ... | |
119 | 120 |
uint32_t cursor_offset; \ |
120 | 121 |
unsigned int (*rgb_to_pixel)(unsigned int r, \ |
121 | 122 |
unsigned int g, unsigned b); \ |
123 |
/* hardware mouse cursor support */ \ |
|
124 |
uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; \ |
|
125 |
void (*cursor_invalidate)(struct VGAState *s); \ |
|
126 |
void (*cursor_draw_line)(struct VGAState *s, uint8_t *d, int y); \ |
|
122 | 127 |
/* tell for each page if it has been updated since the last time */ \ |
123 | 128 |
uint32_t last_palette[256]; \ |
124 | 129 |
uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */ |
... | ... | |
128 | 133 |
VGA_STATE_COMMON |
129 | 134 |
} VGAState; |
130 | 135 |
|
136 |
static inline int c6_to_8(int v) |
|
137 |
{ |
|
138 |
int b; |
|
139 |
v &= 0x3f; |
|
140 |
b = v & 1; |
|
141 |
return (v << 2) | (b << 1) | b; |
|
142 |
} |
|
143 |
|
|
131 | 144 |
void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, |
132 | 145 |
unsigned long vga_ram_offset, int vga_ram_size); |
133 | 146 |
uint32_t vga_mem_readb(void *opaque, target_phys_addr_t addr); |
134 | 147 |
void vga_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t val); |
148 |
void vga_invalidate_scanlines(VGAState *s, int y1, int y2); |
|
149 |
|
|
150 |
void vga_draw_cursor_line_8(uint8_t *d1, const uint8_t *src1, |
|
151 |
int poffset, int w, |
|
152 |
unsigned int color0, unsigned int color1, |
|
153 |
unsigned int color_xor); |
|
154 |
void vga_draw_cursor_line_16(uint8_t *d1, const uint8_t *src1, |
|
155 |
int poffset, int w, |
|
156 |
unsigned int color0, unsigned int color1, |
|
157 |
unsigned int color_xor); |
|
158 |
void vga_draw_cursor_line_32(uint8_t *d1, const uint8_t *src1, |
|
159 |
int poffset, int w, |
|
160 |
unsigned int color0, unsigned int color1, |
|
161 |
unsigned int color_xor); |
|
135 | 162 |
|
136 | 163 |
extern const uint8_t sr_mask[8]; |
137 | 164 |
extern const uint8_t gr_mask[16]; |
Also available in: Unified diff