|
From: | Jd Lyons |
Subject: | Re: [Qemu-ppc] (What happened to the pci_databases.c?) Adding Voodoo2 emulation. |
Date: | Mon, 13 Feb 2017 13:13:33 -0500 |
Ok, thanks Mark, I’ll look into that.
I’ve not gotten very far, I’m just enumerating the device on the device tree. I haven’t done anything about emulating the Voodoo2 Chipset, itself. I’m not really a programmer, more of a hacker. I figured first step is to get the pci121a,2 into the device tree, then get the OS 9 Voodoo Extension to load, then work on emulating the actual Voodoo chip, ram, and ringbus, the the second may not be possible without the third. I don’t really understand how Driver Matching works in the classic Mac OS’s. I know I can hand OS X the ATY, Rage 128 Pro, in the device tree, and it loads the drivers, even the OpenGL drivers, but I have done nothing about emulating the actual Rage 128 Chip. Looks something like: diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c index ac9a764..0e63fc2 100644 --- a/hw/display/vga-pci.c +++ b/hw/display/vga-pci.c @@ -357,8 +357,10 @@ static void secondary_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); + k->vendor_id = PCI_VENDOR_ID_3DFX; + k->device_id = PCI_DEVICE_ID_3DFX_Voodoo2; k->realize = pci_secondary_vga_realize; - k->class_id = PCI_CLASS_DISPLAY_OTHER; + k->class_id = PCI_SUBCLASS_DISPLAY_3D; dc->props = secondary_pci_properties; dc->reset = pci_secondary_vga_reset; } diff --git a/hw/pci/pci.c b/hw/pci/pci.c index a563555..42a071d 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -177,8 +177,8 @@ static void pci_irq_handler(void *opaque, int irq_num, int level); static void pci_add_option_rom(PCIDevice *pdev, bool is_default_rom, Error **); static void pci_del_option_rom(PCIDevice *pdev); -static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_REDHAT_QUMRANET; -static uint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_QEMU; +static uint16_t pci_default_sub_vendor_id = PCI_SUBVENDOR_ID_3DFX; +static uint16_t pci_default_sub_device_id = PCI_SUBDEVICE_ID_Voodoo2; static QLIST_HEAD(, PCIHostState) pci_host_bridges; diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index cbc1fdf..2410ac8 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -55,6 +55,11 @@ #define PCI_VENDOR_ID_QEMU 0x1234 #define PCI_DEVICE_ID_QEMU_VGA 0x1111 +/*_3DFX_Voodoo2(0x121a) */ +#define PCI_VENDOR_ID_3DFX 0x121a +#define PCI_DEVICE_ID_3DFX_Voodoo2 0x0002 +#define PCI_SUBCLASS_DISPLAY_3D 0x02 + /* VMWare (0x15ad) */ #define PCI_VENDOR_ID_VMWARE 0x15ad #define PCI_DEVICE_ID_VMWARE_SVGA2 0x0405 @@ -75,6 +80,9 @@ #define PCI_SUBVENDOR_ID_REDHAT_QUMRANET 0x1af4 #define PCI_SUBDEVICE_ID_QEMU 0x1100 +#define PCI_SUBVENDOR_ID_3DFX 0x121a +#define PCI_SUBDEVICE_ID_Voodoo2 0x0002 + #define PCI_DEVICE_ID_VIRTIO_NET 0x1000 #define PCI_DEVICE_ID_VIRTIO_BLOCK 0x1001 #define PCI_DEVICE_ID_VIRTIO_BALLOON 0x1002 (END) That’s All I really have right now.
|
[Prev in Thread] | Current Thread | [Next in Thread] |