diff --git a/gl/gloffscreen.h b/gl/gloffscreen.h index 71b5d58cda..cbf25c9807 100644 --- a/gl/gloffscreen.h +++ b/gl/gloffscreen.h @@ -31,6 +31,10 @@ #ifdef __APPLE__ #include +#elif defined(_WIN32) +#include +#include +#include #else #include #endif diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 92a0890528..ddfcdb2b60 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -31,4 +31,4 @@ devices-dirs-y += core/ common-obj-y += $(devices-dirs-y) obj-y += $(devices-dirs-y) -obj-$(CONFIG_XBOX) += xbox_pci.o acpi_xbox.o amd_smbus.o nvnet.o nv2a.o nv2a_vsh.o mcpx_apu.o mcpx_aci.o smbus_xbox_smc.o smbus_cx25871.o smbus_adm1032.o lpc47m157.o +obj-$(CONFIG_XBOX) += xbox/ \ No newline at end of file diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs index 541b44e38a..45e61655e9 100644 --- a/hw/i386/Makefile.objs +++ b/hw/i386/Makefile.objs @@ -3,6 +3,5 @@ obj-y += multiboot.o smbios.o obj-y += pc.o pc_piix.o pc_q35.o obj-y += pc_sysfw.o obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o -obj-$(CONFIG_XBOX) += xbox.o chihiro.o obj-y += kvmvapic.o diff --git a/hw/xbox/Makefile.objs b/hw/xbox/Makefile.objs new file mode 100644 index 0000000000..d3159a6441 --- /dev/null +++ b/hw/xbox/Makefile.objs @@ -0,0 +1,7 @@ +obj-y += xbox.o chihiro.o +obj-y += xbox_pci.o acpi_xbox.o +obj-y += amd_smbus.o smbus_xbox_smc.o smbus_cx25871.o smbus_adm1032.o +obj-y += nvnet.o +obj-y += nv2a.o nv2a_vsh.o +obj-y += mcpx_apu.o mcpx_aci.o +obj-y += lpc47m157.o diff --git a/hw/acpi_xbox.c b/hw/xbox/acpi_xbox.c similarity index 96% rename from hw/acpi_xbox.c rename to hw/xbox/acpi_xbox.c index 92ee6d29d0..7e4fba08d0 100644 --- a/hw/acpi_xbox.c +++ b/hw/xbox/acpi_xbox.c @@ -29,9 +29,9 @@ #include "qemu/timer.h" #include "sysemu/sysemu.h" #include "hw/acpi/acpi.h" -#include "hw/xbox_pci.h" +#include "hw/xbox/xbox_pci.h" -#include "hw/acpi_xbox.h" +#include "hw/xbox/acpi_xbox.h" //#define DEBUG #ifdef DEBUG diff --git a/hw/acpi_xbox.h b/hw/xbox/acpi_xbox.h similarity index 100% rename from hw/acpi_xbox.h rename to hw/xbox/acpi_xbox.h diff --git a/hw/amd_smbus.c b/hw/xbox/amd_smbus.c similarity index 99% rename from hw/amd_smbus.c rename to hw/xbox/amd_smbus.c index ea5de912a2..ae097764d1 100644 --- a/hw/amd_smbus.c +++ b/hw/xbox/amd_smbus.c @@ -24,7 +24,7 @@ #include "hw/hw.h" #include "hw/i386/pc.h" -#include "hw/amd_smbus.h" +#include "hw/xbox/amd_smbus.h" #include "hw/i2c/smbus.h" /* AMD756 SMBus address offsets */ diff --git a/hw/amd_smbus.h b/hw/xbox/amd_smbus.h similarity index 100% rename from hw/amd_smbus.h rename to hw/xbox/amd_smbus.h diff --git a/hw/i386/chihiro.c b/hw/xbox/chihiro.c similarity index 99% rename from hw/i386/chihiro.c rename to hw/xbox/chihiro.c index 49fb4e33a7..9ee7285186 100644 --- a/hw/i386/chihiro.c +++ b/hw/xbox/chihiro.c @@ -26,7 +26,7 @@ #include "qemu/config-file.h" #include "sysemu/blockdev.h" #include "block/blkmemory.h" -#include "hw/xbox.h" +#include "hw/xbox/xbox.h" #define SEGA_CHIP_REVISION 0xF0 diff --git a/hw/lpc47m157.c b/hw/xbox/lpc47m157.c similarity index 100% rename from hw/lpc47m157.c rename to hw/xbox/lpc47m157.c diff --git a/hw/mcpx_aci.c b/hw/xbox/mcpx_aci.c similarity index 99% rename from hw/mcpx_aci.c rename to hw/xbox/mcpx_aci.c index 8fa83f86fd..972b95289a 100644 --- a/hw/mcpx_aci.c +++ b/hw/xbox/mcpx_aci.c @@ -21,7 +21,7 @@ #include "hw/pci/pci.h" #include "hw/audio/ac97_int.h" -#include "hw/mcpx_apu.h" +#include "hw/xbox/mcpx_apu.h" typedef struct MCPXACIState { PCIDevice dev; diff --git a/hw/mcpx_apu.c b/hw/xbox/mcpx_apu.c similarity index 99% rename from hw/mcpx_apu.c rename to hw/xbox/mcpx_apu.c index 53ee9bfe2c..ee47bc2351 100644 --- a/hw/mcpx_apu.c +++ b/hw/xbox/mcpx_apu.c @@ -20,7 +20,7 @@ #include "hw/i386/pc.h" #include "hw/pci/pci.h" -#include "hw/mcpx_apu.h" +#include "hw/xbox/mcpx_apu.h" diff --git a/hw/mcpx_apu.h b/hw/xbox/mcpx_apu.h similarity index 100% rename from hw/mcpx_apu.h rename to hw/xbox/mcpx_apu.h diff --git a/hw/nv2a.c b/hw/xbox/nv2a.c similarity index 99% rename from hw/nv2a.c rename to hw/xbox/nv2a.c index f3a558128f..ad64272b0c 100644 --- a/hw/nv2a.c +++ b/hw/xbox/nv2a.c @@ -27,21 +27,10 @@ #include "qapi/qmp/qstring.h" #include "gl/gloffscreen.h" -#include "hw/u_format_r11g11b10f.h" +#include "hw/xbox/u_format_r11g11b10f.h" +#include "hw/xbox/nv2a_vsh.h" -#include "hw/nv2a_vsh.h" - -#ifdef __APPLE__ -#include -#elif defined(_WIN32) -#include -#include -#include -#else -#include -#endif - -#include "hw/nv2a.h" +#include "hw/xbox/nv2a.h" #define DEBUG_NV2A #ifdef DEBUG_NV2A diff --git a/hw/nv2a.h b/hw/xbox/nv2a.h similarity index 100% rename from hw/nv2a.h rename to hw/xbox/nv2a.h diff --git a/hw/nv2a_vsh.c b/hw/xbox/nv2a_vsh.c similarity index 99% rename from hw/nv2a_vsh.c rename to hw/xbox/nv2a_vsh.c index 3454f1252e..4a4f69e609 100644 --- a/hw/nv2a_vsh.c +++ b/hw/xbox/nv2a_vsh.c @@ -29,7 +29,7 @@ #include #include -#include "hw/nv2a_vsh.h" +#include "hw/xbox/nv2a_vsh.h" #define VSH_TOKEN_SIZE 4 diff --git a/hw/nv2a_vsh.h b/hw/xbox/nv2a_vsh.h similarity index 100% rename from hw/nv2a_vsh.h rename to hw/xbox/nv2a_vsh.h diff --git a/hw/nvnet.c b/hw/xbox/nvnet.c similarity index 99% rename from hw/nvnet.c rename to hw/xbox/nvnet.c index 352942d986..3430510255 100644 --- a/hw/nvnet.c +++ b/hw/xbox/nvnet.c @@ -20,7 +20,7 @@ #include "hw/i386/pc.h" #include "hw/pci/pci.h" -#include "hw/nvnet.h" +#include "hw/xbox/nvnet.h" #define IOPORT_SIZE 0x8 diff --git a/hw/nvnet.h b/hw/xbox/nvnet.h similarity index 100% rename from hw/nvnet.h rename to hw/xbox/nvnet.h diff --git a/hw/smbus_adm1032.c b/hw/xbox/smbus_adm1032.c similarity index 100% rename from hw/smbus_adm1032.c rename to hw/xbox/smbus_adm1032.c diff --git a/hw/smbus_cx25871.c b/hw/xbox/smbus_cx25871.c similarity index 100% rename from hw/smbus_cx25871.c rename to hw/xbox/smbus_cx25871.c diff --git a/hw/smbus_xbox_smc.c b/hw/xbox/smbus_xbox_smc.c similarity index 100% rename from hw/smbus_xbox_smc.c rename to hw/xbox/smbus_xbox_smc.c diff --git a/hw/u_format_r11g11b10f.h b/hw/xbox/u_format_r11g11b10f.h similarity index 100% rename from hw/u_format_r11g11b10f.h rename to hw/xbox/u_format_r11g11b10f.h diff --git a/hw/i386/xbox.c b/hw/xbox/xbox.c similarity index 98% rename from hw/i386/xbox.c rename to hw/xbox/xbox.c index 119b48ab8b..3da94b3a13 100644 --- a/hw/i386/xbox.c +++ b/hw/xbox/xbox.c @@ -37,12 +37,12 @@ #include "hw/loader.h" #include "exec/address-spaces.h" -#include "hw/xbox_pci.h" -#include "hw/nvnet.h" -#include "hw/nv2a.h" -#include "hw/mcpx_apu.h" +#include "hw/xbox/xbox_pci.h" +#include "hw/xbox/nvnet.h" +#include "hw/xbox/nv2a.h" +#include "hw/xbox/mcpx_apu.h" -#include "hw/xbox.h" +#include "hw/xbox/xbox.h" /* mostly from pc_memory_init */ static void xbox_memory_init(MemoryRegion *system_memory, diff --git a/hw/xbox.h b/hw/xbox/xbox.h similarity index 100% rename from hw/xbox.h rename to hw/xbox/xbox.h diff --git a/hw/xbox_pci.c b/hw/xbox/xbox_pci.c similarity index 99% rename from hw/xbox_pci.c rename to hw/xbox/xbox_pci.c index ba850ead40..ca823891ef 100644 --- a/hw/xbox_pci.c +++ b/hw/xbox/xbox_pci.c @@ -27,12 +27,12 @@ #include "hw/pci/pci_bus.h" #include "hw/pci/pci_bridge.h" #include "exec/address-spaces.h" - -#include "hw/acpi_xbox.h" -#include "hw/amd_smbus.h" #include "qemu-common.h" -#include "hw/xbox_pci.h" +#include "hw/xbox/acpi_xbox.h" +#include "hw/xbox/amd_smbus.h" + +#include "hw/xbox/xbox_pci.h" /* diff --git a/hw/xbox_pci.h b/hw/xbox/xbox_pci.h similarity index 96% rename from hw/xbox_pci.h rename to hw/xbox/xbox_pci.h index 34996f8c53..73d8b9c768 100644 --- a/hw/xbox_pci.h +++ b/hw/xbox/xbox_pci.h @@ -27,9 +27,9 @@ #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" #include "hw/pci/pci_bus.h" -#include "hw/amd_smbus.h" +#include "hw/xbox/amd_smbus.h" #include "hw/acpi/acpi.h" -#include "hw/acpi_xbox.h" +#include "hw/xbox/acpi_xbox.h" typedef struct XBOX_PCIState {