X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fvga_regs.h;h=fd4a0686e179ea5841cfe967668887740a836fe0;hb=2282a040e60b24d3fb7c48bb197c5bff6636df67;hp=c9858dbe743a7e1a0ff56d90ba79bc9ac5da056d;hpb=4aaddb894098d739868ac4d6a5e74a8787578f89;p=palacios.git diff --git a/palacios/src/devices/vga_regs.h b/palacios/src/devices/vga_regs.h index c9858db..fd4a068 100644 --- a/palacios/src/devices/vga_regs.h +++ b/palacios/src/devices/vga_regs.h @@ -199,6 +199,7 @@ struct vga_mem_mode_reg { uint8_t extended_memory:1; // 1=>256K RAM, 0=>64K uint8_t odd_even:1; // 0 => even addresses go to BOTH banks 0 and 2, odd 1 and 3 + // or flip between 0/1 for CGA compat // 1 => address bank sequentially, map mask selects bank uint8_t chain4:1; // 0 => map mask register used to select bank @@ -630,10 +631,11 @@ page 2-88). // 0 = read gets bits from selected map uint8_t odd_even:1; // 1 = odd/even addressing as in CGMA + // 0 = NOT odd/even + // notice that this is the OPPOSITE of the bit in the sequencer! uint8_t shift_reg_mode:1; // 1 = shift regs get odd bits from odd maps and even/even - uint8_t c256:1; - // 1 = 256 color mode + uint8_t c256:1; // 1 = 256 color mode // 0 = shift_reg_mode controls shift regs uint8_t reserved2:1; } __attribute__((packed)); @@ -713,7 +715,7 @@ struct vga_attribute_controller_address_reg { uint8_t val; struct { uint8_t index:5; // actual address - uint8_t internal_palette_address_srouce:1; + uint8_t internal_palette_address_source:1; // 0 => use the internal color palette (load the regs) // 1 => use the external color palette uint8_t reserved:2; @@ -866,27 +868,13 @@ struct vga_attribute_byte { union { uint8_t val; struct { - union { - uint8_t fore:3; - struct { - uint8_t fore_red:1; - uint8_t fore_green:1; - uint8_t fore_blue:1; - } __attribute__((packed)); - } __attribute__((packed)); + uint8_t fore:3; //foreground color uint8_t foreground_intensity_or_font_select:1; // depends on char map select reg // character map selection is effected // when memory_mode.extended meomory=1 // and the two character map enteries on character_map_select are // different - union { - uint8_t back:3; - struct { - uint8_t back_red:1; - uint8_t back_green:1; - uint8_t back_blue:1; - } __attribute__((packed)); - } __attribute__((packed)); + uint8_t back:3; //background color uint8_t blinking_or_bg_intensity:1; // attribute mode control.enableblink = 1 => blink // =0 => intensity (16 colors of bg)