Rev 63 | Rev 125 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 63 | Rev 106 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | 45 | ||
46 | void ega_init(void) |
46 | void ega_init(void) |
47 | { |
47 | { |
48 | __u8 hi, lo; |
48 | __u8 hi, lo; |
49 | 49 | ||
50 | map_page_to_frame(VIDEORAM, VIDEORAM, PAGE_NOT_CACHEABLE, 0); |
50 | map_page_to_frame(PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE, 0); |
51 | outb(0x3d4,0xe); |
51 | outb(0x3d4,0xe); |
52 | hi = inb(0x3d5); |
52 | hi = inb(0x3d5); |
53 | outb(0x3d4,0xf); |
53 | outb(0x3d4,0xf); |
54 | lo = inb(0x3d5); |
54 | lo = inb(0x3d5); |
55 | ega_cursor = (hi<<8)|lo; |
55 | ega_cursor = (hi<<8)|lo; |
56 | ega_putchar('\n'); |
56 | ega_putchar('\n'); |
57 | } |
57 | } |
58 | 58 | ||
59 | void ega_display_char(char ch) |
59 | void ega_display_char(char ch) |
60 | { |
60 | { |
61 | __u8 *vram = (__u8 *) VIDEORAM; |
61 | __u8 *vram = (__u8 *) PA2KA(VIDEORAM); |
62 | 62 | ||
63 | vram[ega_cursor*2] = ch; |
63 | vram[ega_cursor*2] = ch; |
64 | } |
64 | } |
65 | 65 | ||
66 | /* |
66 | /* |
Line 69... | Line 69... | ||
69 | void ega_check_cursor(void) |
69 | void ega_check_cursor(void) |
70 | { |
70 | { |
71 | if (ega_cursor < SCREEN) |
71 | if (ega_cursor < SCREEN) |
72 | return; |
72 | return; |
73 | 73 | ||
74 | memcopy(VIDEORAM + ROW*2, VIDEORAM, (SCREEN - ROW)*2); |
74 | memcopy(PA2KA(VIDEORAM) + ROW*2, PA2KA(VIDEORAM), (SCREEN - ROW)*2); |
75 | memsetw(VIDEORAM + (SCREEN - ROW)*2, ROW, 0x0720); |
75 | memsetw(PA2KA(VIDEORAM) + (SCREEN - ROW)*2, ROW, 0x0720); |
76 | ega_cursor = ega_cursor - ROW; |
76 | ega_cursor = ega_cursor - ROW; |
77 | } |
77 | } |
78 | 78 | ||
79 | void ega_putchar(const char ch) |
79 | void ega_putchar(const char ch) |
80 | { |
80 | { |