- 精华
- 0
- 帖子
- 2983
- 威望
- 0 点
- 积分
- 2954 点
- 种子
- 0 点
- 注册时间
- 2016-3-17
- 最后登录
- 2020-1-6
|
本帖最后由 devilmaycry200 于 2017-2-9 09:51 编辑
我记得之前怀旧区有一篇帖子说这个的,找不到了,所以就去其他网站上找。
很多人认为x86 pc模拟x86主机应该非常容易并且运行效率也能高很多,所以很多人认为xbox没有成熟模拟器是因为微软通过法律途径禁止。我不知道微软有没有禁止(事实上xbox模拟器并没有停止开发,开源网站上都有源代码),但x86模拟并不像大家想的那么简单,x86本身是cisc架构指令集本身就非常复杂,就算是ps2这么奇葩的处理器都能有模拟器,因为处理器是risc精简指令集架构。目前大部分游戏主机都是risc架构,包括ps3 360,目前ps3模拟器也已经可以运行游戏了。所以之后ps4模拟器应该非常困难,至少民间免费模拟器很困难(可能索尼微软会出官方模拟器)
我贴一段xbox模拟器开发者发的关于为什么xbox模拟器开发困难的原因(用谷歌翻译简单翻译其中第二段关于x86cpu模拟)
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 diffi***. 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.
(模拟x86 CPU比它听起来要难得多。 我不知道这无意的假设是从哪里来的。 是的,有关于x86处理器如何工作的文档的负载,但这并不完全使得容易。 首先,x86指令集是M-A-S-S-I-V-E! 一个指令可以有至少20个不同版本(即,MOV指令有许多不同的版本,以及INC,DEC,ADD,SUB,SHR,SHL,AND,OR,XOR等) 以实施它们。 当然,这不是很难。 真正的问题是任何现代x86处理器(包括Pentium III)都可以一次执行多个指令。 所以它不像模仿一个Z80一次一个指令。 实际的算法和x86如何做到这是未记录的,仍然未知。 总之,Xbox的CPU可以被模拟,但不准确。)
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 difi***y 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 diffi*** 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 diffi*** 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).
最后贴两个 xbox模拟器开源代码网址
http://sourceforge.net/projects/dxbx
dxbx,应该使用delphi写的
https://github.com/LukeUsher/Cxbx-Reloaded
cxbx,应该使用vc++写的
|
|