case 0x3c7:
val = s->dac_state;
break;
+ case 0x3c8:
+ val = s->dac_write_index;
+ break;
case 0x3c9:
val = s->palette[s->dac_read_index * 3 + s->dac_sub_index];
if (++s->dac_sub_index == 3) {
}
-int vga_initialize(DisplayState *ds, uint8_t *vga_ram_base,
- unsigned long vga_ram_offset, int vga_ram_size,
- int is_pci)
+int vga_initialize(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base,
+ unsigned long vga_ram_offset, int vga_ram_size)
{
VGAState *s;
cpu_register_physical_memory(isa_mem_base + 0x000a0000, 0x20000,
vga_io_memory);
- if (is_pci) {
+ if (bus) {
PCIDevice *d;
uint8_t *pci_conf;
- d = pci_register_device("VGA",
+ d = pci_register_device(bus, "VGA",
sizeof(PCIDevice),
- 0, -1,
- NULL, NULL);
+ -1, NULL, NULL);
pci_conf = d->config;
pci_conf[0x00] = 0x34; // dummy VGA (same as Bochs ID)
pci_conf[0x01] = 0x12;