Xenia: Compiling for Windows 7

Created on 13 Jan 2014  Â·  26Comments  Â·  Source: xenia-project/xenia

Hi,
I've cloned this project and tried to build it on my machine using W7 (VS2013), but as I see you're using Windows 8 API functions:

  • RtlAddGrowableFunctionTable
  • RtlGrowFunctionTable
  • RtlDeleteGrowableFunctionTable

Is there any way to implement/replace this functions? I haven't dived into source code to understand what exactly this does (something JIT related, I suppose). Commenting out this functions and changing xinput.lib to xinput_9_1_0 allows Xenia to compile and run, but it crashes during .xex execution.

[edit]
For Windows 7 use XInput from DirectX SDK, not from Platform SDK included with Visual Studio.

Most helpful comment

There is a common theme here, if you really want it go and implement it. This is extra pointless work, all of those OSs will be out of support by the time this project is finished.

All 26 comments

Currently only Win8 is supported. Once more is working it'll be worth going back and cleaning up the code to work on other platforms, however right now nothing works anywhere. The code is churning a lot, and any time spent on doing cross-platform abstractions/etc is potentially wasted. That said, pull requests cleanly handling issues will be accepted :)

Oh wow .. Thanks Ben :3
Make sure it will support Win7 x86 OS's if you can :+1:

If getting it to work x86 takes a while. I don't think it will be worth it. The project won't be done for a few years so in that timespan most people will have switched to an 64bit OS. I rather have the project be fully optimized for x64 operating systems.

@sgtfrankieboy True , But the majority of windows users use x86 .. i mean by this ability its not gonna force people to rebuild their whole OS just to use the emulator , its optional , needful and it will please everyone .. Even the PS3 emulator does that too at the moment :smile:

@Shinox Looking at the statistics from Steam (because well, most people who game and are going to use a emulator on the PC have used Steam). I've added everything up and 78% of all users use an 64-Bit version of Windows and that number will increase in the following years of the development.

Yep, it's definitely not worth trying to get it to work on 32-bit systems if it's going to take a while. Running games takes a powerful PC that will most-likely be running 64-bit Windows, so it's not worth building to 32-bit windows if the people on that version of the OS won't even be able to use Xenia anyways.

The current memory implementation makes it impossible to function on 32-bit systems. Sorry.

Even if we were to write a compatibility layer or something, I feel like it wouldn't provide even near decent performance, given that, as pointed out by @CoolOppo, most games require a large amount of processing power which is more commonly available on x86_64 / AMD64 systems.

Anymore project on the windows 7 compatibility? I'd like to have a og at compiling :)

Nothing yet. I'm concentrating on the JIT right now, which is one of the
few parts that uses Win8-only APIs, and I'll see if I can stub things out
nicely for 7.
On Mar 25, 2014 4:26 AM, "James Heald" [email protected] wrote:

Anymore project on the windows 7 compatibility? I'd like to have a og at
compiling :)

Reply to this email directly or view it on GitHubhttps://github.com/benvanik/xenia/issues/68#issuecomment-38553349
.

Thanks for letting me know! Keep up the good work, you're doing great.

For people who think it would be cool to have Xenia running on a 32-bit version of Windows:

  • x86_32 has only 8 x 32-bit registers vs. 32 x 64-bit in PPC, and to "emulate" a 64-bit register you need two 32-bit registers, which means only 4 registers. But even so, you cannot have 4 because some x86 registers are specific. And every PPC instruction will need to be translated into several 32-bit instructions to made a 64-bit computation into two 32-bit registers.
  • On the other end, x86_64 has 16 x 64-bit registers which allow better generated code grounded on the fact that x86_64 instructions can naturally do 64-bit operations.

So to sum up, at each PPC instruction, the generated code will need to fetch and store 64-bit PPC register from/to memory to fit them in 2 32-bit registers and it will be so bloated because you need to issue some many x86 instructions to emulate a poor 64-bit operation.
Not only, it will be a nightmare and counter-productive for a developer to waste time to do so but the performance will be so bad compared with a 64-bit version that there will be only whinings.

Yeah, what hlide said :)

On Fri Aug 22 2014 at 3:38:16 AM hlide [email protected] wrote:

For people who think it would be cool to have Xenia running on a 32-bit
version of Windows:

-

x86_32 has only 8 x 32-bit registers vs. 32 x 64-bit in PPC, and to
"emulate" a 64-bit register you need two 32-bit registers, which means only
4 registers. But even so, you cannot have 4 because some x86 registers are
specific. And every PPC instruction will need to be translated into several
32-bit instructions to made a 64-bit computation into two 32-bit registers.
-

On the other end, x86_64 has 16 64-bit registers which allow better
generated code grounded on the fact that x86_64 instructions can naturally
do 64-bit operations.

So to sum up, at each PPC instruction, the generated code will need to
fetch and store 64-bit PPC register from/to memory to fit them in 2 32-bit
registers and it will be so bloated because you need to issue some many x86
instructions to emulate a poor 64-bit operation.
Not only, it will be a nightmare and counter-productive for a developer to
waste time to do so but the performance will be so bad compared with a
64-bit version than there will be only whinings.

—
Reply to this email directly or view it on GitHub
https://github.com/benvanik/xenia/issues/68#issuecomment-53046585.

Put aside x86 support, but how about win 7 x64 support? I feel it strange that win 7 x64 is not part of xenia support.

Hopefully you will be able to upgrade from Win 7 to Win 10 painlessly enough, that would be a simpler solution for most people than try change xenia to work on Win 7, also DX12 on Win 10 wont hurt performance at all.

Yeah I looked into this but I'll be upgrading to Windows 10 along with the rest of my friends so I didn't feel that it was worth my time at that point.

And like Blaypeg said benvanik is looking at going DX12 at some point and the backwards compat with even Win8 will stop there at least for a while until Vulkan is out.

FYI Ben once Windows 10 is released, all 7 owners get a free upgrade (as long as they claim it within a year) so it'll become less of an issue since you can then have a workaround to recommend.

Regardless I'm not going to abandon my metro-free OS.

And hell, I'm pretty sure it's possible to get even 64 bit XP to work (with v1_x_0_xp platform target)

Now I would understand if you said _this_ is a pretty hard to manage (it's NT 5 after all), but I don't see why even Vista support should be a big deal to include.

It's still supported in latest Windows SDK and (with the exception of XAudio2 perhaps) it's not that big deal to address, at least in pcsx2

@mirhl if you want it so badly under Win7, just fork the source, modify it to make it work with Win7 (and know the taste of hell of portability vs. efficiency) and then you'll be qualified to criticize some choices... but now you're not in position to demand anything as such without any contribution.

@mirhl as hlide says, if you want to take ownership of the Windows XP port such contributions would be welcome.

Shortly speaking, it should be done for Win7 because it's great and still the most common OS for PC in the world, and Win8 with Win10 are just dissapointing crap. The emulator would reach much more audience if it would work on OS that the most people actually use. The one can talk about advantages of development for particular operating systems as much as he likes, but it doesn't matter as the majority of the audience won't even try the software that is not supported by their OS.

There is a common theme here, if you really want it go and implement it. This is extra pointless work, all of those OSs will be out of support by the time this project is finished.

I don't know about that, alot of games are becoming playable on xenia and alot of people are still using windows 7 :/

Damn how many of these pointless "pls support my OS for free" threads are there? These all need to be closed off. Nothing is stopping you from making it work, don't know how? Pay someone, end of.

Windows 7 is outdated and no longer maintained by Microsoft. When Xenia is finished it will be another couple of years.

Making Xenia compatible with W7 is a complete waste of time for the people actually developing it. So either you install Windows 10, or add W7 support yourself.

Please also remember this is a probably hobby for most of the developers, they don't owe you, or anyone else a W7 version.

I still haven't got how much big parts of the puzzle missing from W7 are (why was the obvious ISA difference even discussed instead?).
EDIT: i.e. if it was just about dynamic function tables, it's a thing. More another.
EDIT2: also, I'm not sure which numbers people are appealing to. Majority of Windows users 32-bit? Where? Win7 quickly dying? After the end of free upgrade numbers have greatly stabilized.

Anyway, let's please stop rhetoric arguments and live peacefully with either decision any competent dev will deem better.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kobyaustin1 picture kobyaustin1  Â·  4Comments

yugi1408 picture yugi1408  Â·  3Comments

SakataGintokiYT picture SakataGintokiYT  Â·  3Comments

Margen67 picture Margen67  Â·  3Comments

thx4ever picture thx4ever  Â·  3Comments