Lines Matching +full:0 +full:xb0000
78 module_param(mda_first_vc, int, 0);
80 module_param(mda_last_vc, int, 0);
86 #define MDA_CURSOR_BLINKING 0x00
87 #define MDA_CURSOR_OFF 0x20
88 #define MDA_CURSOR_SLOWBLINK 0x60
90 #define MDA_MODE_GRAPHICS 0x02
91 #define MDA_MODE_VIDEO_EN 0x08
92 #define MDA_MODE_BLINK_EN 0x20
93 #define MDA_MODE_GFX_PAGE1 0x80
95 #define MDA_STATUS_HSYNC 0x01
96 #define MDA_STATUS_VSYNC 0x80
97 #define MDA_STATUS_VIDEO 0x08
99 #define MDA_CONFIG_COL132 0x08
100 #define MDA_GFX_MODE_EN 0x01
101 #define MDA_GFX_PAGE_EN 0x02
127 outb_p(reg+1, mda_index_port); outb_p(val & 0xff, mda_value_port); in write_mda_w()
154 write_mda_w(location >> 1, 0x0e); in mda_set_cursor()
165 write_mda_b(MDA_CURSOR_OFF, 0x0a); /* disable cursor */ in mda_set_cursor_size()
167 write_mda_b(from, 0x0a); /* cursor start */ in mda_set_cursor_size()
168 write_mda_b(to, 0x0b); /* cursor end */ in mda_set_cursor_size()
185 if (ints[0] < 2) in mdacon_setup()
186 return 0; in mdacon_setup()
190 return 0; in mdacon_setup()
202 int count=0; in mda_detect()
209 q = mda_vram_base + 0x01000 / 2; in mda_detect()
214 scr_writew(0xAA55, p); in mda_detect()
215 if (scr_readw(p) == 0xAA55) in mda_detect()
218 scr_writew(0x55AA, p); in mda_detect()
219 if (scr_readw(p) == 0x55AA) in mda_detect()
225 return 0; in mda_detect()
230 scr_writew(0xA55A, q); in mda_detect()
231 scr_writew(0x0000, p); in mda_detect()
232 if (scr_readw(q) == 0xA55A) in mda_detect()
235 scr_writew(0x5AA5, q); in mda_detect()
236 scr_writew(0x0000, p); in mda_detect()
237 if (scr_readw(q) == 0x5AA5) in mda_detect()
244 mda_vram_len = 0x02000; in mda_detect()
255 if (!test_mda_b(0x66, 0x0f)) in mda_detect()
256 return 0; in mda_detect()
259 if (!test_mda_b(0x99, 0x0f)) in mda_detect()
260 return 0; in mda_detect()
270 for (count = 0; count < 50000 && p_save == q_save; count++) { in mda_detect()
276 switch (inb_p(mda_status_port) & 0x70) { in mda_detect()
277 case 0x10: in mda_detect()
281 case 0x50: in mda_detect()
297 write_mda_b(97, 0x00); /* horizontal total */ in mda_initialize()
298 write_mda_b(80, 0x01); /* horizontal displayed */ in mda_initialize()
299 write_mda_b(82, 0x02); /* horizontal sync pos */ in mda_initialize()
300 write_mda_b(15, 0x03); /* horizontal sync width */ in mda_initialize()
302 write_mda_b(25, 0x04); /* vertical total */ in mda_initialize()
303 write_mda_b(6, 0x05); /* vertical total adjust */ in mda_initialize()
304 write_mda_b(25, 0x06); /* vertical displayed */ in mda_initialize()
305 write_mda_b(25, 0x07); /* vertical sync pos */ in mda_initialize()
307 write_mda_b(2, 0x08); /* interlace mode */ in mda_initialize()
308 write_mda_b(13, 0x09); /* maximum scanline */ in mda_initialize()
309 write_mda_b(12, 0x0a); /* cursor start */ in mda_initialize()
310 write_mda_b(13, 0x0b); /* cursor end */ in mda_initialize()
312 write_mda_w(0x0000, 0x0c); /* start address */ in mda_initialize()
313 write_mda_w(0x0000, 0x0e); /* cursor location */ in mda_initialize()
316 outb_p(0x00, mda_status_port); in mda_initialize()
317 outb_p(0x00, mda_gfx_port); in mda_initialize()
325 mda_vram_len = 0x01000; in mdacon_startup()
326 mda_vram_base = (u16 *)VGA_MAP_MEM(0xb0000, mda_vram_len); in mdacon_startup()
328 mda_index_port = 0x3b4; in mdacon_startup()
329 mda_value_port = 0x3b5; in mdacon_startup()
330 mda_mode_port = 0x3b8; in mdacon_startup()
331 mda_status_port = 0x3ba; in mdacon_startup()
332 mda_gfx_port = 0x3bf; in mdacon_startup()
357 c->vc_complement_mask = 0x0800; /* reverse video */ in mdacon_init()
382 u16 attr = 0x0700; in mda_convert_attr()
389 if (ch & 0x0800) attr = 0x7000; /* reverse */ in mda_convert_attr()
390 else if (ch & 0x0400) attr = 0x0100; /* underline */ in mda_convert_attr()
392 return ((ch & 0x0200) << 2) | /* intensity */ in mda_convert_attr()
393 (ch & 0x8000) | /* blink */ in mda_convert_attr()
394 (ch & 0x00ff) | attr; in mda_convert_attr()
404 * Bit 0..1 : intensity (0..2) in mdacon_build_attr()
419 for (; count > 0; count--) { in mdacon_invert_region()
420 scr_writew(scr_readw(p) ^ 0x0800, p); in mdacon_invert_region()
435 for (; count > 0; count--) { in mdacon_putcs()
466 outb_p(0x00, mda_mode_port); /* disable video */ in mdacon_blank()
508 scr_memmovew(mda_addr(0, t), mda_addr(0, t + lines), in mdacon_scroll()
510 scr_memsetw(mda_addr(0, b - lines), eattr, in mdacon_scroll()
515 scr_memmovew(mda_addr(0, t + lines), mda_addr(0, t), in mdacon_scroll()
517 scr_memsetw(mda_addr(0, t), eattr, lines*mda_num_columns*2); in mdacon_scroll()
551 err = do_take_over_console(&mda_con, mda_first_vc-1, mda_last_vc-1, 0); in mda_console_init()