VirtualBox

Changeset 49884 in vbox


Ignore:
Timestamp:
Dec 12, 2013 11:20:28 AM (11 years ago)
Author:
vboxsync
Message:

Devices/Graphics/DevVGA: back out incomplete change

Location:
trunk/src/VBox/Devices/Graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA.cpp

    r49883 r49884  
    134134#endif
    135135
     136#include "vl_vbox.h"
    136137#include "VBoxDD.h"
    137138#include "VBoxDD2.h"
     
    11741175
    11751176/* called for accesses between 0xa0000 and 0xc0000 */
    1176 static uint32_t vga_mem_readb(PVGASTATE pThis, RTGCPHYS addr, int *prc)
     1177static uint32_t vga_mem_readb(PVGASTATE pThis, target_phys_addr_t addr, int *prc)
    11771178{
    11781179    int memory_map_mode, plane;
     
    12551256
    12561257/* called for accesses between 0xa0000 and 0xc0000 */
    1257 static int vga_mem_writeb(PVGASTATE pThis, RTGCPHYS addr, uint32_t val)
     1258static int vga_mem_writeb(PVGASTATE pThis, target_phys_addr_t addr, uint32_t val)
    12581259{
    12591260    int memory_map_mode, plane, write_mode, b, func_select, mask;
  • trunk/src/VBox/Devices/Graphics/DevVGATmpl.h

    r49883 r49884  
    5656#if DEPTH != 15
    5757
    58 static inline void RT_CONCAT(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)
     58static 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)
    6464{
    6565#if BPP == 1
     
    9292}
    9393
    94 static void RT_CONCAT(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)
     94static 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)
    9797{
    9898    uint32_t xorcol;
     
    102102    do {
    103103        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);
    105105        font_ptr += 4;
    106106        d += linesize << dscan;
     
    108108}
    109109
    110 static void RT_CONCAT(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)
     110static 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)
    113113{
    114114    uint32_t xorcol;
     
    118118    do {
    119119        font_data = font_ptr[0];
    120         RT_CONCAT(vga_draw_glyph_line_, DEPTH)(d,
    121                                                expand4to8[font_data >> 4],
    122                                                xorcol, bgcol, dscan, linesize);
    123         RT_CONCAT(vga_draw_glyph_line_, DEPTH)(d + 8 * BPP,
    124                                                expand4to8[font_data & 0x0f],
    125                                                xorcol, bgcol, dscan, linesize);
     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);
    126126        font_ptr += 4;
    127127        d += linesize << dscan;
     
    129129}
    130130
    131 static void RT_CONCAT(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)
     131static 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)
    134134{
    135135    uint32_t xorcol, v;
     
    181181 * 4 color mode
    182182 */
    183 static void RT_CONCAT(vga_draw_line2_, DEPTH)(VGAState *s1, uint8_t *d,
    184                                               const uint8_t *s, int width)
     183static void glue(vga_draw_line2_, DEPTH)(VGAState *s1, uint8_t *d,
     184                                         const uint8_t *s, int width)
    185185{
    186186    uint32_t plane_mask, *palette, data, v, src_inc, dwb_mode;
     
    225225 * 4 color mode, dup2 horizontal
    226226 */
    227 static void RT_CONCAT(vga_draw_line2d2_, DEPTH)(VGAState *s1, uint8_t *d,
    228                                                 const uint8_t *s, int width)
     227static void glue(vga_draw_line2d2_, DEPTH)(VGAState *s1, uint8_t *d,
     228                                           const uint8_t *s, int width)
    229229{
    230230    uint32_t plane_mask, *palette, data, v, src_inc, dwb_mode;
     
    260260 * 16 color mode
    261261 */
    262 static void RT_CONCAT(vga_draw_line4_, DEPTH)(VGAState *s1, uint8_t *d,
    263                                               const uint8_t *s, int width)
     262static void glue(vga_draw_line4_, DEPTH)(VGAState *s1, uint8_t *d,
     263                                         const uint8_t *s, int width)
    264264{
    265265    uint32_t plane_mask, data, v, *palette;
     
    292292 * 16 color mode, dup2 horizontal
    293293 */
    294 static void RT_CONCAT(vga_draw_line4d2_, DEPTH)(VGAState *s1, uint8_t *d,
    295                                                 const uint8_t *s, int width)
     294static void glue(vga_draw_line4d2_, DEPTH)(VGAState *s1, uint8_t *d,
     295                                           const uint8_t *s, int width)
    296296{
    297297    uint32_t plane_mask, data, v, *palette;
     
    326326 * XXX: add plane_mask support (never used in standard VGA modes)
    327327 */
    328 static void RT_CONCAT(vga_draw_line8d2_, DEPTH)(VGAState *s1, uint8_t *d,
    329                                                 const uint8_t *s, int width)
     328static void glue(vga_draw_line8d2_, DEPTH)(VGAState *s1, uint8_t *d,
     329                                           const uint8_t *s, int width)
    330330{
    331331    uint32_t *palette;
     
    349349 * XXX: add plane_mask support (never used in standard VGA modes)
    350350 */
    351 static void RT_CONCAT(vga_draw_line8_, DEPTH)(VGAState *s1, uint8_t *d,
    352                                               const uint8_t *s, int width)
     351static void glue(vga_draw_line8_, DEPTH)(VGAState *s1, uint8_t *d,
     352                                         const uint8_t *s, int width)
    353353{
    354354    uint32_t *palette;
     
    379379 * 15 bit color
    380380 */
    381 static void RT_CONCAT(vga_draw_line15_, DEPTH)(VGAState *s1, uint8_t *d,
    382                                                const uint8_t *s, int width)
     381static void glue(vga_draw_line15_, DEPTH)(VGAState *s1, uint8_t *d,
     382                                          const uint8_t *s, int width)
    383383{
    384384#if DEPTH == 15 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
     
    394394        g = (v >> 2) & 0xf8;
    395395        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);
    397397        s += 2;
    398398        d += BPP;
     
    405405 * 16 bit color
    406406 */
    407 static void RT_CONCAT(vga_draw_line16_, DEPTH)(VGAState *s1, uint8_t *d,
    408                                                const uint8_t *s, int width)
     407static void glue(vga_draw_line16_, DEPTH)(VGAState *s1, uint8_t *d,
     408                                          const uint8_t *s, int width)
    409409{
    410410#if DEPTH == 16 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
     
    420420        g = (v >> 3) & 0xfc;
    421421        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);
    423423        s += 2;
    424424        d += BPP;
     
    431431 * 24 bit color
    432432 */
    433 static void RT_CONCAT(vga_draw_line24_, DEPTH)(VGAState *s1, uint8_t *d,
    434                                                const uint8_t *s, int width)
     433static void glue(vga_draw_line24_, DEPTH)(VGAState *s1, uint8_t *d,
     434                                          const uint8_t *s, int width)
    435435{
    436436    int w;
     
    449449        r = s[2];
    450450#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);
    452452        s += 3;
    453453        d += BPP;
     
    458458 * 32 bit color
    459459 */
    460 static void RT_CONCAT(vga_draw_line32_, DEPTH)(VGAState *s1, uint8_t *d,
    461                                                const uint8_t *s, int width)
     460static void glue(vga_draw_line32_, DEPTH)(VGAState *s1, uint8_t *d,
     461                                          const uint8_t *s, int width)
    462462{
    463463#if DEPTH == 32 && defined(WORDS_BIGENDIAN) == defined(TARGET_WORDS_BIGENDIAN)
     
    478478        r = s[2];
    479479#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);
    481481        s += 4;
    482482        d += BPP;
     
    491491static
    492492#endif/* VBOX */
    493 void RT_CONCAT(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)
     493void 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)
    499499{
    500500    const uint8_t *plane0, *plane1;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette