

- Exophase manual profile scan update#
- Exophase manual profile scan code#
- Exophase manual profile scan psp#
Exophase manual profile scan code#
From what I've seen not a lot of code in IWRAM is modified per-frame, even when DMA is used.

It may be the case that some games also load in huge chunks of code to swap it in and out of RAM constantly, which isn't quite the same as self-modifying code but appears the same. The GBA doesn't have cache, so some games still do this.

It's a pretty old technique that's shunned these days because it doesn't get along well with caching. Some games only change a few bytes, but constantly. The problem comes when games modify code in RAM a LOT. There's some overhead checking if writes modify code, but it's not a lot.
Exophase manual profile scan update#
The operation to scan and update all of RAM would probably be as slow or slower than just recompiling all of it. Normally all of the code that was in RAM is flushed, since the buffers aren't setup in a way that allow you to flush part of it, and doing so would make any other blocks that branch into the modified block invalid. These modifications to code do have to be checked, because it means that the code that has been dynamically recompiled has to be flushed (since it is no longer valid). Sometimes it's reloaded when the game changes significantly (like entering a new area, or going from the title screen to ingame), but usually it stays the same for a long time. Usually this code is just left alone after being loaded, so it's like ROM but faster. Most games will load a bit of code into RAM to run it quickly. ROM can't be overwritten, so when code is encountered from ROM it's known that it'll always be the same. gpSP doesn't support executing code from VRAM right now so that's out already). This is the issue: GBA can execute code from one of two places, ROM (the cartridge and the BIOS) and RAM (that includes IWRAM, EWRAM, and rarely, VRAM. This idea was a bit complex and had some serious complications and I basically abandoned it when I thought of something simpler. Some months ago I came up with a new idea to try to improve the situation. I've tried some hacks to get around it, and they've helped, but they were very ugly. There is an issue with certain GBA games that has plagued me since I first started work on gpSP.
Exophase manual profile scan psp#
(NOTE: this post pertains to any ports of gpSP using dynarec, that means the PSP and GP2X versions)
