A9VG电玩部落论坛

 找回密码
 注册
搜索
查看: 3194|回复: 4

来谈谈为什么没有成熟初代xbox模拟器,以及以后x86架构主机模拟器的可行性

[复制链接]

精华
0
帖子
2983
威望
0 点
积分
2954 点
种子
0 点
注册时间
2016-3-17
最后登录
2020-1-6
 楼主| 发表于 2017-2-9 09:48  ·  江苏 | 显示全部楼层 |阅读模式
本帖最后由 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++写的

精华
0
帖子
372
威望
0 点
积分
642 点
种子
347 点
注册时间
2016-8-26
最后登录
2020-6-21
发表于 2017-2-9 10:48  ·  广东 | 显示全部楼层
还是360的xbox1官方模拟器实用,模拟效果也不错。

精华
0
帖子
2983
威望
0 点
积分
2954 点
种子
0 点
注册时间
2016-3-17
最后登录
2020-1-6
 楼主| 发表于 2017-2-9 11:00  ·  江苏 | 显示全部楼层
retrocast 发表于 2017-2-9 10:48
还是360的xbox1官方模拟器实用,模拟效果也不错。

估计以后非官方模拟器开发会非常困难

精华
0
帖子
1709
威望
0 点
积分
1738 点
种子
115 点
注册时间
2005-5-30
最后登录
2024-11-30
发表于 2017-2-9 11:03  ·  广东 | 显示全部楼层
这就是微软最牛X的地方,360模拟Xbox的模拟器做的真的很牛x

弑神者

旁门左道驱良币 城狐社鼠扭于前 不舞之鹤闭塞听积羽沉舟只等闲

精华
3
帖子
173293
威望
3 点
积分
184056 点
种子
2042 点
注册时间
2009-12-1
最后登录
2024-10-15
发表于 2017-2-9 11:08  ·  黑龙江 | 显示全部楼层
现在的模拟器的使用 也是越来越复杂了。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|A9VG电玩部落 川公网安备 51019002005286号

GMT+8, 2024-12-3 01:31 , Processed in 0.186669 second(s), 17 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部