void vga_alpha_switch_to_font_plane() { vga_write_GC(0x4,0x02); /* NTS: Read Map Select: This is very important if the caller wants to read from the font plane without reading back gibberish */ vga_write_GC(0x5,0x00); vga_write_GC(0x6,0x0C); vga_write_sequencer(0x2,0x04); vga_write_sequencer(0x4,0x06); }
void vga_alpha_switch_from_font_plane() { vga_write_GC(0x4,0x00); vga_write_GC(0x5,0x10); vga_write_GC(0x6,0x0E); vga_write_sequencer(0x2,0x03); vga_write_sequencer(0x4,0x02); }
/* EGA/VGA only */ void vga_set_memory_map(unsigned char c) { unsigned char b; if (vga_state.vga_flags & VGA_IS_VGA) { b = vga_read_GC(6); vga_write_GC(6,(b & 0xF3) | (c << 2)); update_state_vga_memory_map_select(c); } else if (vga_state.vga_flags & VGA_IS_EGA) { /* guessing code because you can't readback regs on EGA */ b = int10_getmode(); /* INT 10H text modes: set odd/even, else, set alpha disable */ vga_write_GC(6,0x02 | (c << 2)); update_state_vga_memory_map_select(c); } }