Changeset 49884 in vbox
- Timestamp:
- Dec 12, 2013 11:20:28 AM (11 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r49883 r49884 134 134 #endif 135 135 136 #include "vl_vbox.h" 136 137 #include "VBoxDD.h" 137 138 #include "VBoxDD2.h" … … 1174 1175 1175 1176 /* called for accesses between 0xa0000 and 0xc0000 */ 1176 static uint32_t vga_mem_readb(PVGASTATE pThis, RTGCPHYSaddr, int *prc)1177 static uint32_t vga_mem_readb(PVGASTATE pThis, target_phys_addr_t addr, int *prc) 1177 1178 { 1178 1179 int memory_map_mode, plane; … … 1255 1256 1256 1257 /* called for accesses between 0xa0000 and 0xc0000 */ 1257 static int vga_mem_writeb(PVGASTATE pThis, RTGCPHYSaddr, uint32_t val)1258 static int vga_mem_writeb(PVGASTATE pThis, target_phys_addr_t addr, uint32_t val) 1258 1259 { 1259 1260 int memory_map_mode, plane, write_mode, b, func_select, mask; -
trunk/src/VBox/Devices/Graphics/DevVGATmpl.h
r49883 r49884 56 56 #if DEPTH != 15 57 57 58 static inline void RT_CONCAT(vga_draw_glyph_line_, DEPTH)(uint8_t *d,59 60 61 62 63 58 static inline void glue(vga_draw_glyph_line_, DEPTH)(uint8_t *d, 59 int font_data, 60 uint32_t xorcol, 61 uint32_t bgcol, 62 int dscan, 63 int linesize) 64 64 { 65 65 #if BPP == 1 … … 92 92 } 93 93 94 static void RT_CONCAT(vga_draw_glyph8_, DEPTH)(uint8_t *d, int linesize,95 96 94 static void glue(vga_draw_glyph8_, DEPTH)(uint8_t *d, int linesize, 95 const uint8_t *font_ptr, int h, 96 uint32_t fgcol, uint32_t bgcol, int dscan) 97 97 { 98 98 uint32_t xorcol; … … 102 102 do { 103 103 font_data = font_ptr[0]; 104 RT_CONCAT(vga_draw_glyph_line_, DEPTH)(d, font_data, xorcol, bgcol, dscan, linesize);104 glue(vga_draw_glyph_line_, DEPTH)(d, font_data, xorcol, bgcol, dscan, linesize); 105 105 font_ptr += 4; 106 106 d += linesize << dscan; … … 108 108 } 109 109 110 static void RT_CONCAT(vga_draw_glyph16_, DEPTH)(uint8_t *d, int linesize,111 112 110 static void glue(vga_draw_glyph16_, DEPTH)(uint8_t *d, int linesize, 111 const uint8_t *font_ptr, int h, 112 uint32_t fgcol, uint32_t bgcol, int dscan) 113 113 { 114 114 uint32_t xorcol; … … 118 118 do { 119 119 font_data = font_ptr[0]; 120 RT_CONCAT(vga_draw_glyph_line_, DEPTH)(d,121 122 123 RT_CONCAT(vga_draw_glyph_line_, DEPTH)(d + 8 * BPP,124 125 120 glue(vga_draw_glyph_line_, DEPTH)(d, 121 expand4to8[font_data >> 4], 122 xorcol, bgcol, dscan, linesize); 123 glue(vga_draw_glyph_line_, DEPTH)(d + 8 * BPP, 124 expand4to8[font_data & 0x0f], 125 xorcol, bgcol, dscan, linesize); 126 126 font_ptr += 4; 127 127 d += linesize << dscan; … … 129 129 } 130 130 131 static void RT_CONCAT(vga_draw_glyph9_, DEPTH)(uint8_t *d, int linesize,132 133 131 static void glue(vga_draw_glyph9_, DEPTH)(uint8_t *d, int linesize, 132 const uint8_t *font_ptr, int h, 133 uint32_t fgcol, uint32_t bgcol, int dup9) 134 134 { 135 135 uint32_t xorcol, v; … … 181 181 * 4 color mode 182 182 */ 183 static void RT_CONCAT(vga_draw_line2_, DEPTH)(VGAState *s1, uint8_t *d,184 183 static void glue(vga_draw_line2_, DEPTH)(VGAState *s1, uint8_t *d, 184 const uint8_t *s, int width) 185 185 { 186 186 uint32_t plane_mask, *palette, data, v, src_inc, dwb_mode; … … 225 225 * 4 color mode, dup2 horizontal 226 226 */ 227 static void RT_CONCAT(vga_draw_line2d2_, DEPTH)(VGAState *s1, uint8_t *d,228 227 static void glue(vga_draw_line2d2_, DEPTH)(VGAState *s1, uint8_t *d, 228 const uint8_t *s, int width) 229 229 { 230 230 uint32_t plane_mask, *palette, data, v, src_inc, dwb_mode; … … 260 260 * 16 color mode 261 261 */ 262 static void RT_CONCAT(vga_draw_line4_, DEPTH)(VGAState *s1, uint8_t *d,263 262 static void glue(vga_draw_line4_, DEPTH)(VGAState *s1, uint8_t *d, 263 const uint8_t *s, int width) 264 264 { 265 265 uint32_t plane_mask, data, v, *palette; … … 292 292 * 16 color mode, dup2 horizontal 293 293 */ 294 static void RT_CONCAT(vga_draw_line4d2_, DEPTH)(VGAState *s1, uint8_t *d,295 294 static void glue(vga_draw_line4d2_, DEPTH)(VGAState *s1, uint8_t *d, 295 const uint8_t *s, int width) 296 296 { 297 297 uint32_t plane_mask, data, v, *palette; … … 326 326 * XXX: add plane_mask support (never used in standard VGA modes) 327 327 */ 328 static void RT_CONCAT(vga_draw_line8d2_, DEPTH)(VGAState *s1, uint8_t *d,329 328 static void glue(vga_draw_line8d2_, DEPTH)(VGAState *s1, uint8_t *d, 329 const uint8_t *s, int width) 330 330 { 331 331 uint32_t *palette; … … 349 349 * XXX: add plane_mask support (never used in standard VGA modes) 350 350 */ 351 static void RT_CONCAT(vga_draw_line8_, DEPTH)(VGAState *s1, uint8_t *d,352 351 static void glue(vga_draw_line8_, DEPTH)(VGAState *s1, uint8_t *d, 352 const uint8_t *s, int width) 353 353 { 354 354 uint32_t *palette; … … 379 379 * 15 bit color 380 380 */ 381 static void RT_CONCAT(vga_draw_line15_, DEPTH)(VGAState *s1, uint8_t *d,382 381 static void glue(vga_draw_line15_, DEPTH)(VGAState *s1, uint8_t *d, 382 const uint8_t *s, int width) 383 383 { 384 384 #if DEPTH == 15 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) … … 394 394 g = (v >> 2) & 0xf8; 395 395 b = (v << 3) & 0xf8; 396 ((PIXEL_TYPE *)d)[0] = RT_CONCAT(rgb_to_pixel, DEPTH)(r, g, b);396 ((PIXEL_TYPE *)d)[0] = glue(rgb_to_pixel, DEPTH)(r, g, b); 397 397 s += 2; 398 398 d += BPP; … … 405 405 * 16 bit color 406 406 */ 407 static void RT_CONCAT(vga_draw_line16_, DEPTH)(VGAState *s1, uint8_t *d,408 407 static void glue(vga_draw_line16_, DEPTH)(VGAState *s1, uint8_t *d, 408 const uint8_t *s, int width) 409 409 { 410 410 #if DEPTH == 16 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) … … 420 420 g = (v >> 3) & 0xfc; 421 421 b = (v << 3) & 0xf8; 422 ((PIXEL_TYPE *)d)[0] = RT_CONCAT(rgb_to_pixel, DEPTH)(r, g, b);422 ((PIXEL_TYPE *)d)[0] = glue(rgb_to_pixel, DEPTH)(r, g, b); 423 423 s += 2; 424 424 d += BPP; … … 431 431 * 24 bit color 432 432 */ 433 static void RT_CONCAT(vga_draw_line24_, DEPTH)(VGAState *s1, uint8_t *d,434 433 static void glue(vga_draw_line24_, DEPTH)(VGAState *s1, uint8_t *d, 434 const uint8_t *s, int width) 435 435 { 436 436 int w; … … 449 449 r = s[2]; 450 450 #endif 451 ((PIXEL_TYPE *)d)[0] = RT_CONCAT(rgb_to_pixel, DEPTH)(r, g, b);451 ((PIXEL_TYPE *)d)[0] = glue(rgb_to_pixel, DEPTH)(r, g, b); 452 452 s += 3; 453 453 d += BPP; … … 458 458 * 32 bit color 459 459 */ 460 static void RT_CONCAT(vga_draw_line32_, DEPTH)(VGAState *s1, uint8_t *d,461 460 static void glue(vga_draw_line32_, DEPTH)(VGAState *s1, uint8_t *d, 461 const uint8_t *s, int width) 462 462 { 463 463 #if DEPTH == 32 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN) … … 478 478 r = s[2]; 479 479 #endif 480 ((PIXEL_TYPE *)d)[0] = RT_CONCAT(rgb_to_pixel, DEPTH)(r, g, b);480 ((PIXEL_TYPE *)d)[0] = glue(rgb_to_pixel, DEPTH)(r, g, b); 481 481 s += 4; 482 482 d += BPP; … … 491 491 static 492 492 #endif/* VBOX */ 493 void RT_CONCAT(vga_draw_cursor_line_, DEPTH)(uint8_t *d1,494 495 496 497 498 493 void glue(vga_draw_cursor_line_, DEPTH)(uint8_t *d1, 494 const uint8_t *src1, 495 int poffset, int w, 496 unsigned int color0, 497 unsigned int color1, 498 unsigned int color_xor) 499 499 { 500 500 const uint8_t *plane0, *plane1;
Note:
See TracChangeset
for help on using the changeset viewer.