A9VG电玩部落论坛

 找回密码
 注册
搜索
查看: 10922|回复: 35

XBOX之所以很难被模拟的原因

[复制链接]

精华
0
帖子
3870
威望
0 点
积分
4072 点
种子
19 点
注册时间
2005-6-1
最后登录
2024-4-29
 楼主| 发表于 2015-1-30 19:41  ·  河北 | 显示全部楼层 |阅读模式
今天突然想到一个问题 就是现在连WII都可以模拟了 XBOXONE也出了 那么作为上上世代的XBOX怎么还没有模拟呢? 然后去查了下 只找到了这个英文资料 感觉挺有意思的 就给翻译了一下 都是自己翻译的 错漏的地方轻喷 谢谢.

我先做个总结 关于XBOX的模拟 作者的意思是X86架构的CPU非常复杂 NV的显卡也很难攻破 那么我不禁想到 本世代的PS4 和XO不都是X86结构的吗 AMD的显卡也不见得比NV的好搞 那么作为爷爷辈的XBOX到现在都还没有攻破 那以后家用机模拟是不是就没有什么希望了? 模拟器难道要在PS360时代完结吗?

下面是原文:
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.

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).


-------------------------------分割线-------------------------------------------


原文出自blueshogun96
"XBOX就像台PC,很好模拟"

是的,我们经常听到这种愚蠢无脑的观点,而其通常会得出无脑的结论(或者说是假设?),就因为XBOX很像PC.它的硬件应该很容易模拟.这种想法是非常错误的.那么模拟有多难?非常难!XBOX的硬件非常复杂而且至今的资料也少得可怜.以下具体阐述.

1.PC就很好模拟吗?我不这么认为.看看bochs(译者注:Bochs是一个x86硬件平台的开源模拟器)的源代码.有很多是不是?

2.模拟X86的CPU比听起来困难的多.我不知道上面那种无脑的假设是从那来的.没错,关于X86处理器的工作方式有很多资料可查,但也不等于模拟就很容易.首先,X86的指令集非-常-庞-大!一个指令至少20种不同版本(也就是说,有非常多不同版本的MOV指令,还有INC,DEC,ADD,SUB,SHR,SHL,AND,OR,XOR等等.)要去逐一实现非常耗时,当然,这并不是很难.真正的问题在于每一个X86型号的处理器包括奔腾3都能一次处理多条指令.所以跟模拟Z80这种一次处理一条指令的处理器不一样.X86的运行机制没有资料可查,如何做到的也是未知.简单的说,XBOX的CPU是能够模拟的,但并不精确.(译者注:不能精确模拟意味着也许可以运行游戏,但会非常不稳定,而且这还只是CPU)

3.模拟任何NVIDIA的硬件都不轻松!XBOX的GPU,NV2A经常被认为就是GeForce 3.错了!它们是很像,但并不完全相同.NV2A还有一部分GeForce 4的特性,所以它应该是介于NV20和NV25之间.这也不意味着容易被模拟.NVIDIA的GPU都有非常庞大的寄存器组,然而已经被发现的甚至不到一半.而且很大一部分已知的寄存器的作用也还不知道.NVIDIA的GPU的工作方式方面的资料也几乎没有.最好的做法是参考相似的GPU,例如RIVA TNT 还有老型号的GeForce显卡.有些寄存器很像,但并不一样.参考资料最好的地方是去看看网上的开源驱动.另外目前还没有人搞清楚NV2X系列显卡像素着色器和顶点着色器的工作方式.XBOX的GPU还有个多出来的在GeForce显卡上没见到过的寄存器.几个月前,NV2A的GPU寄存器的数据开始被发现了.但还有很长的路要走.GeForce 3系列是NIVDIA的GPU中最神秘的.(G7X和G8X不算)而NV2A更糟.有很多这类问题,"但是你不能在其他NVIDIA显卡上直接执行NV2A的指令吗?"不行,而且是不可能的.NV2A的MMIO地址是不同的,而且那个多出来的寄存器也必须模拟才行.再加上,WINDOWS的ring0入口也没有,所以还是省省吧.接下来是NForce 2的芯片组.这算是比较容易的部分.NVIDIA MCPX是音频,USB输入,网络适配器,PCI,AGP,等的控制中心.除了音频,其他东西模拟到没那么难.

4.音频系统非常复杂.XBOX的音频至少包含4个DSP,一个音频编码器(AC'97)和一个NVIDIA SOUNDSTORM APU.DSP倒不是问题(只需要把他们都找出来).AC'97也问题不大.但是NVIDIA SOUNDSTORM APU却是非常难的部分.目前我还没有找到任何关于这玩意的资料,而现在还在用的也很少了.

5.XBOX的BIOS没有完全搞明白.BIOS的基础处理程序还是知道的,但是细节还不清楚.已知的部分可以提供些线索,但在BIOS可以模拟之前.我们需要更好的了解XBOX硬件的布局,因为BIOS在引导的时候初始化了一些未知的硬件,并且在没有用到XDK开发包的情况下进行了硬件的直接写入.这需要点时间和努力,但我最终能解决他.

6.视频编码器简直是"地狱".XBOX的视频输出用了一个视频编码器,而不是RAMDAC.为什么这么纠结?微软的每一个版本XBOX都用了不同的视频编码器(从1.0到1.6共7种).为什么这么干?不知道.这就是微软,他们老是爱"修补"其实不存在的问题.据我所知就至少有3个不同视频编码器:Conexant CX25871, Focus FS454,和 Xcalibur.点击这里,有关于XBOX视频编码器的更多信息(译者注:作者可能是给了个链接,我没有).模拟这3个视频编码器也还不到这场战斗的一半.真正的麻烦是每个版本的XBOX的BIOS跟特定的编码器是逐一关联的(说错了我也不管).跟PS2一样,每个版本的XBOX的BIOS都经过了升级.这是个潜在的问题,但问题不大.

基本上,我是试图让你们别再抱有"XBOX应该很好模拟,因为它就是台PC"这种想法.我肯定你们有些人不同意我的观点,但是基于以上理由以及其他原因.最低限度,XBOX也是比PS2更难模拟的.

上面说的有个例外,就是现在NV2A的资料已经更多的被公开了,但并不完整.有个开源的关于OPENXDK资源叫做PBKIT.它的硬件界面直观,潜力可观.这才是微软应该干的.(或者这少做个低级OPENGL工具吧)

精华
0
帖子
4640
威望
1 点
积分
5284 点
种子
535 点
注册时间
2008-9-25
最后登录
2023-8-23
发表于 2015-1-30 20:06  ·  新加坡 | 显示全部楼层
我补充一下,这个原作者blueshogun96是模拟器Xenoborg的作者,所以他说的这些问题都是很正确、很实际的。

但是,鉴于Xbox360可以较好模拟Xbox游戏的事实,我有一种感觉,blueshogun96可能还没有看透这些表层问题的本质原因。

精华
0
帖子
3870
威望
0 点
积分
4072 点
种子
19 点
注册时间
2005-6-1
最后登录
2024-4-29
 楼主| 发表于 2015-1-30 20:13  ·  河北 | 显示全部楼层
o_sharp 发表于 2015-1-30 20:06
我补充一下,这个原作者blueshogun96是模拟器Xenoborg的作者,所以他说的这些问题都是很正确、很实际的。

...

当然 看得出作者的主要问题出在资料不全上 不管是CPU还是GPU 甚至音频处理器 官方之所以做得出还是因为资料齐全吧 所以说以后在官方不公开资料的情况下 今后主机的模拟是很难了

精华
0
帖子
37581
威望
0 点
积分
43639 点
种子
1713 点
注册时间
2010-9-9
最后登录
2025-1-15
发表于 2015-1-30 20:16  ·  湖北 | 显示全部楼层
很深奥,知道X360能模拟真是幸事。。。

精华
0
帖子
4640
威望
1 点
积分
5284 点
种子
535 点
注册时间
2008-9-25
最后登录
2023-8-23
发表于 2015-1-30 20:19  ·  新加坡 | 显示全部楼层
koferma 发表于 2015-1-30 20:13
当然 看得出作者的主要问题出在资料不全上 不管是CPU还是GPU 甚至音频处理器 官方之所以做得出还是因为资 ...

模拟器的本质是逆向工程,如果有资料就不需要费事去做了,也就失去了做模拟器的乐趣了嘛。

Dolphin早期也有很难解决的问题,这些问题的解决方案,都是慢慢被他们推理出来的。Xbox这边显然愿意投入精力的人不多。

精华
0
帖子
1742
威望
0 点
积分
1772 点
种子
22 点
注册时间
2008-6-24
最后登录
2025-1-15
发表于 2015-1-30 20:30  ·  内蒙古 | 显示全部楼层
应该说是没有顶级的hacker愿意做这个无用功,无关于资料的缺乏和实际难度.

精华
0
帖子
3870
威望
0 点
积分
4072 点
种子
19 点
注册时间
2005-6-1
最后登录
2024-4-29
 楼主| 发表于 2015-1-30 20:33  ·  河北 | 显示全部楼层
o_sharp 发表于 2015-1-30 20:19
模拟器的本质是逆向工程,如果有资料就不需要费事去做了,也就失去了做模拟器的乐趣了嘛。

Dolphin早期 ...

呵呵 的确 对于模拟器的开发者来说 乐趣也许是最重要的 而像我这样的使用者的想法却更功利 老实说 在看到这篇文章之前 我也是那种抱有"XBOX就是PC"这种愚蠢想法的人之一...

精华
0
帖子
669
威望
0 点
积分
689 点
种子
53 点
注册时间
2014-2-24
最后登录
2025-1-14
发表于 2015-1-30 21:42  ·  浙江 | 显示全部楼层
抛开技术层面不说,谁敢碰微软的东西——找死

精华
0
帖子
189
威望
0 点
积分
196 点
种子
27 点
注册时间
2007-12-28
最后登录
2025-1-14
发表于 2015-1-30 21:54  ·  江苏 | 显示全部楼层
我听说早期很多模拟器开发出来,功能只是简单一部分! 只能运行系统~   不是刻意追求去玩

精华
0
帖子
1640
威望
0 点
积分
1727 点
种子
20 点
注册时间
2010-11-16
最后登录
2024-12-22
发表于 2015-1-30 21:57  ·  广东 | 显示全部楼层
主要原因是这个主机太小众
从PS2和dreamcast的模拟器比较就可知
PS2比较热门,模拟器也较完备
dreamcast人气不敌ps2,模拟器到现在都不完美,能模拟的游戏也很少

次要原因当然是资料不全了
但是,资料不全的问题,应该所有主机都存在
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-1-16 03:59 , Processed in 0.204157 second(s), 16 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部