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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Solving the Mystery of ARM7TDMI Multiply Carry Flag

90 点作者 skrrtww7 个月前

4 条评论

userbinator7 个月前
<i>And just to get this out of the way, the carry flag’s behavior after multiplication isn’t an important detail to emulate at all. Software doesn’t rely on it.</i><p>On as fixed of a hardware as a game console, and with the accompanying anti-piracy&#x2F;anti-cheating&#x2F;emulation efforts of that industry, I&#x27;d expect it to be. From the history of emulating previous consoles, we know that any deterministic difference can and will be exploited, either to determine whether the hardware is authentic, or incidentally as a result of unintentional bugs.<p>This reminds me of the Z80, where two undefined flags resisted analysis for several decades; a 2-year-old set of slides on the state of that here: <a href="https:&#x2F;&#x2F;archive.fosdem.org&#x2F;2022&#x2F;schedule&#x2F;event&#x2F;z80&#x2F;attachments&#x2F;slides&#x2F;5207&#x2F;export&#x2F;events&#x2F;attachments&#x2F;z80&#x2F;slides&#x2F;5207&#x2F;z80_last_secrets.pdf" rel="nofollow">https:&#x2F;&#x2F;archive.fosdem.org&#x2F;2022&#x2F;schedule&#x2F;event&#x2F;z80&#x2F;attachmen...</a>
评论 #41922494 未加载
评论 #41922188 未加载
评论 #41922248 未加载
skrrtww7 个月前
<a href="https:&#x2F;&#x2F;shonumi.github.io&#x2F;blog&#x2F;nds_rolling.html" rel="nofollow">https:&#x2F;&#x2F;shonumi.github.io&#x2F;blog&#x2F;nds_rolling.html</a><p>More context on how this value affects (at least one) DS game- see post from December 27th, 2019.
评论 #41920878 未加载
ujikoluk7 个月前
&gt; Seriously, they decided that the program counter should be a general purpose register. Why???<p>Don&#x27;t really understand this reaction. Why not? Seems to make for a nice regular design that the PC is just another register.
评论 #41922215 未加载
评论 #41923550 未加载
评论 #41927062 未加载
评论 #41925064 未加载
评论 #41922238 未加载
flohofwoe7 个月前
&gt; it allows the program counter to be used a general purpose register<p>From a CPU emulator writer&#x27;s perspective this isn&#x27;t all that strange. For instance on Z80 the immediate jump instruction `JP nnnn` is loading a 16-bit immediate value into the internal PC register, which is the same thing as loading a 16-bit value into a regular register pair (e.g. &#x27;LD HL,nnnn&#x27;) - e.g. the mnemonics for the jump instruction could just as well be `LD PC,nnnn` ;)<p>A relative jump (which does a signed-add of an 8-bit offset value to the 16-bit address in PC) is the same math as the Z80 indexed addressing mode (IX+d) and (IY+d) (I don&#x27;t know though if the same transistors are used).<p>A RET (load 16-bit value from stack into PC) is the the same operation as a POP (load 16-bit value from stack into a regular register pair).<p>...so it&#x27;s almost surprising that the program counter <i>isn&#x27;t</i> exposed as a regular register in most (traditional) CPUs. I guess in modern CPUs it&#x27;s not so simple because of the internal pipelining though.
评论 #41924242 未加载