The "Why we are never getting a XB1/PS4 emulator" thread

Status
Not open for further replies.
Going to post this here, since we're already seeing a boatload of "The XB1/PS4 looks just like a PC; its going to be trivial to emulate" comments here:

http://www.neogaf.com/forum/showpost.php?p=48088464&postcount=26

here is what cxbx developer wrote about xbox emulation some time ago
Originally Posted by blueshogun96
"Xbox is just like a PC, it's easy to emulate!"

Yes, we've all heard this silly and pointless argument a million times and it usually ends in the same, and rather ignorant conclusion (or should I say assumption) that just because the Xbox is PC similar, it's hardware should be relatively easy to emulate. That's a very wrong frame of mind. How hard can it be? Very. Xbox's hardware is very complex and still poorly documented to this day. This requires some explanation.

1. Is a PC easy to emulate? Well, I wouldn't say so myself. Take a look at the source code from bochs. A lot of source code/work isn't it?

2. Emulating an x86 CPU is a lot harder than it sounds. I don't know where this mindless assumption comes from. Yes, there's loads of documentation on how the x86 processor works, but that doesn't exactly make it easy. First of all, the x86 instruction set is M-A-S-S-I-V-E! There can be at least 20 different versions of one instruction (i.e. There are many different versions of the MOV instruction, as well as INC, DEC, ADD, SUB, SHR, SHL, AND, OR, XOR etc.) and it takes time to implement them all. Of course, that's not exactly difficult. The real problem is that any modern x86 processor including the Pentium III can execute multiple instructions at once. So it's not like emulating a Z80 doing one instruction at a time. The actual algorithm and how x86 does this is undocumented and still unknown. In short, the Xbox's CPU can be emulated, but not accurately.

3. Emulating any hardware by NVIDIA is not a walk in the park! The Xbox's GPU, the NV2A is often assumed just a GeForce 3. It's not! It's similar but not identical. It has some GeForce 4 capabilities too, so it's more of a cross between an NV20 and NV25. This is by no means easy to emulate either. NVIDIA's GPUs have very large register sets and afaik not even half of them have been discovered, and a large portion of known registers have unknown purposes. There is little to no documentation on how NVIDIA GPUs work. The best thing to do is to look at similar GPUs such as RIVA, TNT, and older GeForce cards. Some registers are similar, but not identical. The best place to look for information is in open source drivers available on the net. Adding to the dificulty is that no one has ever discovered how pixel shaders work on NV2x cards, vertex shaders yes though. The Xbox GPU also has exclusive registers that are not found in other GeForce cards. Information on the NV2A's GPU registers are just now beginning to be discovered a few months ago. And yet, there's still a long way to go. The GeForce 3 series is the most mysterious of all NVIDIA GPUs (G7x and G8x aside) and the NV2A is alot worse. "But can't you just directly execute the NV2A instructions on another NVIDIA card?". No, I get alot of questions concerning this, and it is impossible. It's MMIO addresses are different and the exclusive registers must be emulated. Plus, in windows, we don't have ring 0 access anyway, so you all can scratch that idea now. Then comes the NForce 2 chipset. This is where it get easier. The NVIDIA MCPX is the control center for things such as audio, USB for input, Network adapters, PCI, AGP, etc. These things are not really that difficult to emulate IMO except for the audio.

4. The Audio system is rather complex. Xbox's audio consists of at least 4 DSPs, and audio codec (AC '97) and an NVIDIA SoundStorm APU. The DSPs shouldn't be a problem (just figuring out what they all are is) nor should the AC '97 but the NVIDIA SoundStorm APU is the really difficult part. So far I haven't found any information on this thing, but right now, it's relevance is low.

5. The Xbox BIOS isn't fully understood. The basic execution process of the BIOS is understood, but details on the process are at a loss. What we do know gives us hints, but before the BIOS can be emulated, we'll need a better understanding of the Xbox hardware layout because the BIOS does some unknown hardware initialization at boot time and writes to the hardware directly without using any XDK stuff. It will take some time, and effort, but I'll eventually get it working.

6. Video Encoder "Hell". Instead of using a RAMDAC for video output, the Xbox uses a Video Encoder. What makes this suck a pain? Microsoft sought the need to change the video encoder every other Xbox version (there are seven in all, 1.0 - 1.6). Why, I dunno, it's a Microsoft thing, they always tend to try to "fix" things that aren't broken >.> AFAIK, there are at least 3 different Video Encoders used: Conexant CX25871, Focus FS454, and Xcalibur. For more information in Xbox video encoders, click here. Emulating all three video encoders is only less than half the battle, the real problem is that BIOSes can be specifically tied to a specific encoder depending on it's version (don't quote me on this though). Like PS2, every Xbox model revision has a updated BIOS and has different expectations. This is a potential problem, but not exactly major.

Basically, I'm trying to get this "Xbox should be easy to emulate because it's just like a PC" crap out of your heads. I'm sure that most of you will disagree with me on this, but for these reasons and more, on a low level, Xbox is harder to emulate than PS2.

^ The exception to that above is that the NV2A is much better documented now, but not fully. There's an open source library for the OpenXDK called pbKit. It interfaces directly with the hardware to fully expose it's potential. This is what Microsoft should have done all along (or at least wrote a low-level OpenGL implementation).

So I'm sorry to defeat a few peoples delusions, but no, you aren't going to be able to pop in a XB1/PS4 game into a PC and play it anytime soon, if ever.
 
Thanks. More exact answers then I could give. :D

I posted mainly because I'm already seeing this topic come up (especially by the Linux guys, who are assuming they can magically pop in a disk and play.) Figured I'd rather de-bunk it now, rather then later.
 

pohotu3

Honorable
Nov 29, 2013
1
0
10,510
Here the thing about that thread, the copypasta, if you'll note, is from the original xbox and ps2, when it wasn't operating on hardware off the shelf (That's what this gen's hardware is, off the shelf AMD APUs, minor customization, but the architecture is nearly identical to that of a computer.) I'll set about telling you why his points are silly and invalid now.

2.) We don't need to emulate x86 processor architecture, it's already the instruction set the computers are running on...

3.) We don't need to emulate NVIDIA hardware, we need to emulate AMD hardware, which is quite honestly much further behind, and it's a based on a APU that's been out for 2 or 3 year now, and has already been toyed with and understood. In addition, the functionality of that APU exists in every modern card and processor.

4.) Audio system is an off the shelf sound card, runs the same way as a PC card.

5.) True, however the motherboard is, again, based on an existing motherboard. That means that the BIOS that was adapted for this gen of gaming consoles is going to be close, if not identical to the the final product.

6.) The video encoder for the APU is going to be virtually identical to the original, I think I've probably repeated that enough that you'll understand it now.
 

Dracconus

Distinguished
Oct 17, 2011
12
0
18,510
@pohotu3

The things that you fail to realize will be pointed out here...

1. We will not have to "emulate", perse the x86 instruction set, but we will still need to figure out which ones are used, and for what methods. This can pose a grave complication to the process.

2. Although AMD's hardware is behind it's still very capable hardware with complex instruction sets.

3. While people have been working with AMD's APU's they have very little to do with it at all. The only reason people used ot bring up the Xbox's processor is because it WAS NOT an x86 instruction set, nor even a typical "PC" CPU. The APU's are going to be harder to emulate than you think due to the structure they utilize whereby the GPU is actually an instruction within the core itself. In other words, we're going to have to basically hand code a driver that would allow our cpu to run DX11 information through as if it were a GPU which is going to DRASTICALLY slow down any processor on the market, including I7 extreme's just because we're going to emulating that information sent to it, then re-performing the requested functions.
Think back to any emulator you have used (if any). Software processing was slower than hardware. Software is what you're going to have to use without a way to dedicate our dedicated GPU's to the task of drawing the emulated information which I'm not entirely sure would even be possible since it's intended to be used differently than a GPU would handle it.

4. The audio system is the least of the complications, and they always have been in anything for the most part. Getting sound to work in a game has negligible impact on the emulation process itself, and is always the last thing to be worked on.

5. the motherboard is NOT based on any existing board. The motherboards for both the PS4, and XB1 are unique to each console, and have varying degrees of differences and capabilities, as well as limitations, and hardware components. Just because they use the same CPU, and socket doesn't mean they have the same speed of ram as a native the same bios, bios options, bios environment, version, operating system, capacitors, transistors, SMC's, Northbridge, Southbridge, amount of Lanes, ethernet ports, NIC chips, etc.
Every one of those things can equal a hindrance, and added layer of difficulty to the emulator's programming team.

6. The Video Encoder for the apu is indeed NOT identical to the original xbox or the 360's, nor should it be as they're utilizing different hardware, and different software with multitudes of capabilities added to it. Video Encoders are more dependent on system structure, and environment than the processing unit themselves. Anyone that's ever installed a video encoder knows that.

If you're going to try and "school" people on a subject, at least have a LITTLE information on what the hell you're talking about.
 

BellySaga

Honorable
Jan 7, 2014
1
0
10,510
Some may want to reconsider their views. There are already people "hacking" PS4 hardware and they're getting vital info to help system emulation development.

I even found a project for a PS4 emulator here: http://sourceforge.net/projects/playstation4emulatorx8664pc/
 
^^ And? There's a PS3 emulator too. Can't do much more then load the BIOS though, because its too damn hard to do. I mean, hell, to emulate the SNES properly, you need a 3GHz processor.

People really don't understand how emulators actually work, and that's the issue. Its not happening, at least for a few decades.
 

BellySaga2

Honorable
Jan 16, 2014
2
0
10,510


Decades? You're insane(and unknowledgeable). 3 GHz CPU clock speed for SNES? It appears you don't know how emulators work, or how little power of resources are needed for SNES(a console more than 20 years old)!

With a 3 GHz and supporting specifications you could emulate PS2 pretty well. I've done it, trust me. Don't tell people there will not be a PS4 emulator ... people said the same thing about PS2 in 2000, but we have PCSX2, and it runs extremely well, emulates mostly all games that I've tried (since 2011), and can run like a breeze with a mid-to-high-end computer system(spoiler: a possible port to Android might come in the next few years).

 

BellySaga2

Honorable
Jan 16, 2014
2
0
10,510


Not anytime soon. In the future? Definitely. Before 2020 I can almost guarantee you that one will exist.

PS4 will exist sooner though, because I've spoke with the developer and they have a team working on hacking the PS4 hardware to really get the emulation process going much faster.

Wii U uses a difficult to implement GPU, but it will be done, mark my words. Xbox One I can't say.....
 

MusicRush

Honorable
Nov 28, 2013
82
0
10,630


I really dont see a point in emulating xbone/ps4 other than the few exclusives. Wii on the other hand has no PC games
 


http://arstechnica.com/gaming/2011/08/accuracy-takes-power-one-mans-3ghz-quest-to-build-a-perfect-snes-emulator/

Sure, SNES9x, ZSNES, and others work "well", but they use special hacks in the source to make games work. They aren't emulating the system as a whole, and there's a lot of things that don't work right as a result. That's why Byuu created BSNES [and later, Higan]. And yes, using the accurate engine, even my 2600k gets slowdown on some titles.

Same reason why we have so many issues with N64 emulation: The RSP/RDP is near impossible to emulate in software due to speed constraints, so High-Level-Emulation [HLE] is used whereever possible, for speed reasons. As a result though, some titles just don't work right [Body Harvest clipping issues, Rouge Squadron not running due to custom microcode not being reversed engineered, etc]. Loads of other "minor" issues due to how the N64 handled graphic rendering, especially texture filtering, which can't be duplicated well using Direct X/OpenGL [overflowing health/energy bars, etc].

Also remember that the 360/PS3 were the first [major; I'm excluding the Saturn from this discussion] multi-core systems, which, due to needing to keep each CPU context in sync, is going to require an order of magnitude more power to emulate [as software locking is going to be a MAJOR limiting factor]. Nevermind figuring out a clean way to emulate the specialized chips on each platform, many of which don't even have publicly available sepcs. PS3/360 emulators aren't going to be runnable in any way for at least a decade, and running games at any decent performance will take years after that. And I suspect teh PS3's arch is going to be so difficult, it never gets emulated.

The WiiU though is doable; it's main CPU is just the continued evolution of the PPC750 arch that the Gamecube was built around, with additional features. I'd suspect we'd see a WiiU emulator up in about 5 years, with games playable in 8 years or so.

PS4/XB1 isn't happening for at least a couple decades.
 

BellySaga3

Honorable
Jan 19, 2014
1
0
10,510
You have no evidence to indicate it will take "decades" for emulators like PS4 to be in a semi-working state. You, personally, seem to have a vice against a possibility of this magnitude(e.g. you don't want to believe it's capable in only years to come). Ps3's emulation is so slow and poor because few people are barely doing anything to improve it. The Ps3's project only has 12 developers, and almost none do any pushes on Git or change code that often. The Ps4 EMX project on sourceforge is expecting a greater magnitude of people to implement HLE and dynamic recompilstion, plus HLE of the GPU for SIMD. The developer even stated that there's already some code, just none has been added to the project yet(except "dummy code"). If there's enough help I would say that PS3 and 4 could be semi-capable of running games before 2020
 


I know from past experience. I've worked on emulators before, something the talking heads here haven't. Emulators, even for "recent" consoles like the PS2 are simple in comparison to anything with a high level OS; you aren't concerned about emulating how the OS is handling memory management, much less keeping the OS synchronized with the rest of the system, keeping the internal CPU cache consistent [MAJOR performance killer here], and so on and so forth. ITS NOT HAPPENING.
 

BellySagaFO

Honorable
Jan 21, 2014
1
0
10,510


Oh no? Just you wait and see! I am on the project as well.

 

Tomahawker

Honorable
Feb 1, 2014
2
0
10,510
Oh no? Just you wait and see! I am on the project as well.

Project of what, four people on that PS4 EMX crap with no code published yet? Good luck to any progress in the coming years. RPCS3 has been around several years and it can do next to nothing in overall PS3 emulation, aside from SOME workings on the SPEs, threading, and rendering(nothing near GPU-capable for games, and the CeLL architecture needs a LOT of work for proper execution).

I'm being realistic here ... a project for something the magnitude of PS3/PS4 with just a few people, undocumented hardware, and massively powerful resources needed for accurate emulation (to any degree) will not happen overnight.

 

BellySagaNIN

Reputable
Feb 19, 2014
2
0
4,510


It's not solely the amount of people (though more can help tremendously), but the amount of work put in. You can have 50 people take longer to do a job that 20 did faster; it's about how much work each person puts in, not how many people there are in general. I have proof of concept of this, since having too many people does the opposite (takes longer in many cases).

10-20 people will be ideal for PS4 EMX, at least for the first year(s) to come.

 

RogerNINX

Reputable
Mar 7, 2014
3
0
4,510
I'll personally bet the OP - $1,000,000,000.00 - that a PS4 emulator will exist and run AAA titles before the next few decades. That goes without saying! I'm even willing to sign a legally-bound contract because I'm so certain of it.
 

Bellysaga_

Reputable
Mar 25, 2014
1
0
4,510


Yeah, I was going to add support for the settings menu bars (e.g. boot settings, plugins (if any are used), drop down combo boxes, a debugger window, etc.), but I ran into shit at work and can't find any time to work on it anymore.

 


Menu's and such, which are trivial. Active projects can have dozens of commits per day. 17 for its lifetime is NOTHING.

Personally? I'd rather we get a "decent" N64 emulator, since the N64 emulation scene is a bloody mess right now. MUPEN64PLUS helps, but really, PJ64 has issues, MUPEN isn't there yet, 1964 is trash these days. The N64 hardware is the WORST when it comes to emulation, since it really doesn't map well to PC's. If we can't even do the N64 well, almost two decades later, why should we expect the even harder to emulate PS4 to come along any faster?

At the very least, between emulating the CPU resources, you also have to VM the host OS (Win8/BSD), which farther adds complexity. Don't even want to consider how the heck to handle that case; anything more then a basic OS simply adds too much complexity into the mix.
 

belly_saga

Reputable
Apr 3, 2014
1
0
4,510


Why are you bothering to compare the "imperfection" of N64 emulation to PS4? Who cares? PS3 emulation is soon to surpass Xbox emulation. That's backwards as is, but PS4 would not necessarily be much different. In some ways, easier!
 


Because if its not perfect, its not an emulator, its a hack that gets the end result "good enough", but doesn't behave like the system will, which is the entire purpose of an emulator. Its the "get things working now" approach that has ensured dozens of games for the N64 will forever remain unplayable.

Secondly, call me when a PS3 emulator can actually do something. And no, a PS4 emulator would be far, far harder, simply due to a much larger host OS.
 

bellysaga_1

Reputable
Apr 9, 2014
1
0
4,510
RPCS3 already boots several commercial games, and more are surely to come. One is fully playable. It certainly counts as "something." Anyways, a PS4 emulator/virtual machine would be very different from a PS3 one, so it's not quite easy to just say it will be much harder. We were considering other tactics besides emulation anyways (e.g. simulation interpreter).
 

snufflylake

Reputable
Apr 17, 2014
2
0
4,510



Actually you should be able to play XboxOne games on your PC pretty soon. Not by emulation but by running the XboxOS on your PC.
The XboxOne uses 2 custom versions of Windows 8 and a small XboxOS. There probably wouldn't be too much work needed to get the OS running on a normal Desktop PC without emulation.You would just need to decrypt the keys signed to the Xbox XVD files, extract the contents and with some tweaking it may just work. I am not 100% sure though as i don't think that anyone has had access to the contents inside the Xbox XVD files yet and no one knows exactly how they work. But from what Microsoft has said about how the OS works, it sounds like it could be possible. There is more information about the OS on here : http://wccftech.com/xbox-one-architecture-explained-runs-windows-8-virtually-indistinguishable/
 
Status
Not open for further replies.

TRENDING THREADS