- Timestamp:
- Jun 1, 2012 12:52:16 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.h
r41539 r41541 178 178 #else /* VBOX */ 179 179 180 /* bird: Since we've changed types, reordered members, done alignment 181 paddings and more, VGA_STATE_COMMON was added directly to the 182 struct to make it more readable and easier to handle. */ 183 180 184 struct VGAState; 181 185 typedef int FNGETBPP(struct VGAState *s); … … 186 190 typedef void FNCURSORDRAWLINE(struct VGAState *s, uint8_t *d, int y); 187 191 188 /* bird: vram_offset have been remove, function pointers declared external,189 some type changes, and some padding have been added. */190 #define VGA_STATE_COMMON \191 R3PTRTYPE(uint8_t *) vram_ptrR3; \192 R3PTRTYPE(FNGETBPP *) get_bpp; \193 R3PTRTYPE(FNGETOFFSETS *) get_offsets; \194 R3PTRTYPE(FNGETRESOLUTION *) get_resolution; \195 R3PTRTYPE(FNRGBTOPIXEL *) rgb_to_pixel; \196 R3PTRTYPE(FNCURSORINVALIDATE *) cursor_invalidate; \197 R3PTRTYPE(FNCURSORDRAWLINE *) cursor_draw_line; \198 RTR3PTR R3PtrCmnAlignment; \199 uint32_t vram_size; \200 uint32_t latch; \201 uint8_t sr_index; \202 uint8_t sr[256]; \203 uint8_t gr_index; \204 uint8_t gr[256]; \205 uint8_t ar_index; \206 uint8_t ar[21]; \207 int32_t ar_flip_flop; \208 uint8_t cr_index; \209 uint8_t cr[256]; /* CRT registers */ \210 uint8_t msr; /* Misc Output Register */ \211 uint8_t fcr; /* Feature Control Register */ \212 uint8_t st00; /* status 0 */ \213 uint8_t st01; /* status 1 */ \214 uint8_t dac_state; \215 uint8_t dac_sub_index; \216 uint8_t dac_read_index; \217 uint8_t dac_write_index; \218 uint8_t dac_cache[3]; /* used when writing */ \219 uint8_t palette[768]; \220 int32_t bank_offset; \221 VGA_STATE_COMMON_BOCHS_VBE \222 /* display refresh support */ \223 uint32_t font_offsets[2]; \224 int32_t graphic_mode; \225 uint8_t shift_control; \226 uint8_t double_scan; \227 uint8_t padding1[2]; \228 uint32_t line_offset; \229 uint32_t line_compare; \230 uint32_t start_addr; \231 uint32_t plane_updated; \232 uint8_t last_cw, last_ch, padding2[2]; \233 uint32_t last_width, last_height; /* in chars or pixels */ \234 uint32_t last_scr_width, last_scr_height; /* in pixels */ \235 uint32_t last_bpp; \236 uint8_t cursor_start, cursor_end, padding3[2]; \237 uint32_t cursor_offset; \238 /* hardware mouse cursor support */ \239 uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; \240 /* tell for each page if it has been updated since the last time */ \241 uint32_t last_palette[256]; \242 uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */243 244 192 #endif /* VBOX */ 245 193 … … 249 197 250 198 typedef struct VGAState { 199 #ifndef VBOX 251 200 VGA_STATE_COMMON 252 #ifdef VBOX 201 #else /* VBOX */ 202 R3PTRTYPE(uint8_t *) vram_ptrR3; 203 R3PTRTYPE(FNGETBPP *) get_bpp; 204 R3PTRTYPE(FNGETOFFSETS *) get_offsets; 205 R3PTRTYPE(FNGETRESOLUTION *) get_resolution; 206 R3PTRTYPE(FNRGBTOPIXEL *) rgb_to_pixel; 207 R3PTRTYPE(FNCURSORINVALIDATE *) cursor_invalidate; 208 R3PTRTYPE(FNCURSORDRAWLINE *) cursor_draw_line; 209 RTR3PTR R3PtrCmnAlignment; 210 uint32_t vram_size; 211 uint32_t latch; 212 uint8_t sr_index; 213 uint8_t sr[256]; 214 uint8_t gr_index; 215 uint8_t gr[256]; 216 uint8_t ar_index; 217 uint8_t ar[21]; 218 int32_t ar_flip_flop; 219 uint8_t cr_index; 220 uint8_t cr[256]; /* CRT registers */ 221 uint8_t msr; /* Misc Output Register */ 222 uint8_t fcr; /* Feature Control Register */ 223 uint8_t st00; /* status 0 */ 224 uint8_t st01; /* status 1 */ 225 uint8_t dac_state; 226 uint8_t dac_sub_index; 227 uint8_t dac_read_index; 228 uint8_t dac_write_index; 229 uint8_t dac_cache[3]; /* used when writing */ 230 uint8_t palette[768]; 231 int32_t bank_offset; 232 VGA_STATE_COMMON_BOCHS_VBE 233 /* display refresh support */ 234 uint32_t font_offsets[2]; 235 int32_t graphic_mode; 236 uint8_t shift_control; 237 uint8_t double_scan; 238 uint8_t padding1[2]; 239 uint32_t line_offset; 240 uint32_t line_compare; 241 uint32_t start_addr; 242 uint32_t plane_updated; 243 uint8_t last_cw, last_ch, padding2[2]; 244 uint32_t last_width, last_height; /* in chars or pixels */ 245 uint32_t last_scr_width, last_scr_height; /* in pixels */ 246 uint32_t last_bpp; 247 uint8_t cursor_start, cursor_end, padding3[2]; 248 uint32_t cursor_offset; 249 /* hardware mouse cursor support */ 250 uint32_t invalidated_y_table[VGA_MAX_HEIGHT / 32]; 251 /* tell for each page if it has been updated since the last time */ 252 uint32_t last_palette[256]; 253 uint32_t last_ch_attr[CH_ATTR_SIZE]; /* XXX: make it dynamic */ 254 253 255 /** end-of-common-state-marker */ 254 256 uint32_t u32Marker;
Note:
See TracChangeset
for help on using the changeset viewer.