remix logo

Hacker Remix

Solving the Mystery of ARM7TDMI Multiply Carry Flag

14 points by skrrtww 2 hours ago | 3 comments

userbinator 2 hours ago

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.

On as fixed of a hardware as a game console, and with the accompanying anti-piracy/anti-cheating/emulation efforts of that industry, I'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.

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: https://archive.fosdem.org/2022/schedule/event/z80/attachmen...

skrrtww 2 hours ago

https://shonumi.github.io/blog/nds_rolling.html

More context on how this value affects (at least one) DS game- see post from December 27th, 2019.

userbinator 2 hours ago

I'm not really familiar with ARM Asm but do you think that's handwritten Asm that its author overlooked the effects of the carry and it just happened to work, or a clever "emulator trap" added by Nintendo's compiler?