Statistics
| Branch: | Revision:

root / hw / vga-isa.c @ 86d86414

History | View | Annotate | Download (1.7 kB)

1 76323919 Juan Quintela
/*
2 76323919 Juan Quintela
 * QEMU ISA VGA Emulator.
3 76323919 Juan Quintela
 *
4 76323919 Juan Quintela
 * Copyright (c) 2003 Fabrice Bellard
5 76323919 Juan Quintela
 *
6 76323919 Juan Quintela
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 76323919 Juan Quintela
 * of this software and associated documentation files (the "Software"), to deal
8 76323919 Juan Quintela
 * in the Software without restriction, including without limitation the rights
9 76323919 Juan Quintela
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 76323919 Juan Quintela
 * copies of the Software, and to permit persons to whom the Software is
11 76323919 Juan Quintela
 * furnished to do so, subject to the following conditions:
12 76323919 Juan Quintela
 *
13 76323919 Juan Quintela
 * The above copyright notice and this permission notice shall be included in
14 76323919 Juan Quintela
 * all copies or substantial portions of the Software.
15 76323919 Juan Quintela
 *
16 76323919 Juan Quintela
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 76323919 Juan Quintela
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 76323919 Juan Quintela
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 76323919 Juan Quintela
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 76323919 Juan Quintela
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 76323919 Juan Quintela
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 76323919 Juan Quintela
 * THE SOFTWARE.
23 76323919 Juan Quintela
 */
24 76323919 Juan Quintela
#include "hw.h"
25 76323919 Juan Quintela
#include "console.h"
26 76323919 Juan Quintela
#include "pc.h"
27 76323919 Juan Quintela
#include "vga_int.h"
28 76323919 Juan Quintela
#include "pixel_ops.h"
29 76323919 Juan Quintela
#include "qemu-timer.h"
30 5245d57a Gerd Hoffmann
#include "loader.h"
31 76323919 Juan Quintela
32 76323919 Juan Quintela
int isa_vga_init(void)
33 76323919 Juan Quintela
{
34 76323919 Juan Quintela
    VGACommonState *s;
35 76323919 Juan Quintela
36 76323919 Juan Quintela
    s = qemu_mallocz(sizeof(*s));
37 76323919 Juan Quintela
38 76323919 Juan Quintela
    vga_common_init(s, VGA_RAM_SIZE);
39 76323919 Juan Quintela
    vga_init(s);
40 0be71e32 Alex Williamson
    vmstate_register(NULL, 0, &vmstate_vga_common, s);
41 76323919 Juan Quintela
42 76323919 Juan Quintela
    s->ds = graphic_console_init(s->update, s->invalidate,
43 76323919 Juan Quintela
                                 s->screen_dump, s->text_update, s);
44 76323919 Juan Quintela
45 f0138a63 Anthony Liguori
    vga_init_vbe(s);
46 5245d57a Gerd Hoffmann
    /* ROM BIOS */
47 5245d57a Gerd Hoffmann
    rom_add_vga(VGABIOS_FILENAME);
48 76323919 Juan Quintela
    return 0;
49 76323919 Juan Quintela
}