TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Exercises in Emulation: Xbox 360’s FMA Instruction

102 点作者 nikbackm大约 6 年前

7 条评论

udp大约 6 年前
<i>&gt; I left the Xbox team long before the Xbox One shipped and I haven’t paid any attention to it since then, so I don’t know what they decided to do.</i><p>From experience trying to play 360 games on an Xbox One, the console reads nothing from the DVD and instead downloads the game from the Internet. It also only works for specific games. I therefore assume they gave up with emulation and simply recompiled certain 360 games for x64.
评论 #19450187 未加载
评论 #19449835 未加载
anisppp大约 6 年前
Personally found this article overly dramatic and a bit dumb. All this wall of text just to point out that FMA needs to be emulated... ok.. but it’s a solved problem. This is also not a new problem.. fmaf is defined in C99 standard so There are multiple open source library implementations of FMA using round to odd for years.<p>You can just read that code and see how it’s done. Despite the ridiculous ending there was no mystery to begin with.<p><a href="https:&#x2F;&#x2F;www.lri.fr&#x2F;~melquion&#x2F;doc&#x2F;08-tc.pdf" rel="nofollow">https:&#x2F;&#x2F;www.lri.fr&#x2F;~melquion&#x2F;doc&#x2F;08-tc.pdf</a>
评论 #19455665 未加载
lifthrasiir大约 6 年前
As far as I know, a correct emulation of FMA involves the double-double approach [1], that is to split a logical mantissa potentially larger than the native mantissa and merge them later. This is of course expensive and probably not a good fit for the OP&#x27;s purpose anyway.<p>[1] <a href="https:&#x2F;&#x2F;hal-ens-lyon.archives-ouvertes.fr&#x2F;inria-00080427v2&#x2F;document" rel="nofollow">https:&#x2F;&#x2F;hal-ens-lyon.archives-ouvertes.fr&#x2F;inria-00080427v2&#x2F;d...</a> has a verified proof.
评论 #19450067 未加载
robbiet480大约 6 年前
&gt; If you apply for a mortgage when your job title is emulation ninja then you are in a quandary. If you write that on the mortgage application then you look like a lunatic. If you write “software engineer” then you get in trouble when the mortgage broker calls your employer. You know. Hypothetically.
评论 #19452278 未加载
评论 #19449800 未加载
SlowRobotAhead大约 6 年前
The whole time I was reading I was interested in what they chose to do... a lot of build up and no solution :&#x2F;<p>Maybe they did recompile the games for backwards compatibility, maybe they do have an emulator, IDK, but I want to know how they would have fixed this issue.
评论 #19450130 未加载
评论 #19454699 未加载
pedrocr大约 6 年前
Do games really rely on the rounding behaviors of floats to not break? Seems like there should always be plenty of margin around that. But maybe something does a loop with these instructions over and over and the error compounds?<p>And wouldn&#x27;t the solution on x86 be to use the more than double precision floats that are available in the platform?<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Extended_precision" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Extended_precision</a>
评论 #19450374 未加载
评论 #19450036 未加载
评论 #19450080 未加载
评论 #19456944 未加载
评论 #19453765 未加载
评论 #19455612 未加载
pascal_cuoq大约 6 年前
Bruce Dawson always does an excellent job of explaining subtle floating-point behaviors simply, but there is one sentence I do not agree with in this particular post:<p>&gt; However, for any rounding rule that you might come up with there is a case where the double rounding will give you a different answer from a true FMA.<p>For every “directed” rounding (up, down, towards zero), rounding the result of one operation first to higher precision and then to the intended precision is identical to rounding directly to the intended precision. For this reason, computing the FMA as “first compute the multiplication in higher precision so that no rounding happens in this step, then add the third operand at the same precision, then round to the nominal precision” does not suffer from double-rounding issues in all these rounding modes (which are all the rounding modes defined by IEEE 754 other than “round to nearest”).<p>So you do not even need to “come up with” them. They already exist, they are all the standardized rounding modes other than “round to nearest”.<p>Note: the reasoning above assumes the result of the multiplication is representable as a normal number in the higher-precision format. It is a property of IEEE 754 formats that the next more precise one can always represent the result of the multiplications of two finite numbers from the format below it as a normal number.