| It is difficult to take a binary program and establish intent. I'd rather call these "interesting and unusual programming tricks" than "anti-emulation measures" until more evidence is presented. Mirrored memory is a side effect of unconnected lines on the address bus thus making the content of those bits irrelevant. Code can take advantage of this to run faster or put tag values into addresses. On a GBA, VRAM is faster than ordinary RAM. Programs can do well to use it for tight inner loops. Using STM (store multiple) to DMA registers? Again, go faster. Save type masquerading might be code that helps when running on a development kit, but I admit that I can't think of what use it might have. Self-modifying code that depends on the pre-fetch queue might be the best place to look for intent. Might be easy to tell if the program is doing it for some larger purpose or simply to fail subtly or overtly if it sees unrealistic processor behavior. Any why would a program do extra work writing to an audio FIFO than need be? |
What does this have to do with speed?
On a GBA, VRAM is faster than ordinary RAM. Programs can do well to use it for tight inner loops.
Almost all programs use IWRAM for this. It's one of the things it's for. It's as fast if not faster than VRAM (depends on if the VRAM is being accessed by the PPU at the time).
Using STM (store multiple) to DMA registers? Again, go faster.
In retrospect, yeah this might actually be the case.
Save type masquerading might be code that helps when running on a development kit, but I admit that I can't think of what use it might have.
There are a handful of GBA games that lie about save type as anti-piracy and refuse to save or even boot if it finds the wrong one. It's also really the only anti-piracy technique that any other GBA games actually use, since it's quite effective against flash carts.