When the prefetcher encounters a 0x20000 boundary, it stops fetching and behaves as though it is full (it will use up whatever it has in the buffer and does not fetch anymore until the cpu fetches the next instruction after the buffer has emptied.)
It seems as though an extra cycle delay happens on the cpu fetch if the buffer is not empty. This is the only way I can pass the test, otherwise I get 40 instead of the required 41. I haven't completely worked out the details yet.
When the prefetcher encounters a 0x20000 boundary, it stops fetching and behaves as though it is full (it will use up whatever it has in the buffer and does not fetch anymore until the cpu fetches the next instruction after the buffer has emptied.)
Here is a test demonstrating this:
https://github.com/alyosha-tas/gba-tests/blob/master/prefetcher/bounday_test_1.gba
It seems as though an extra cycle delay happens on the cpu fetch if the buffer is not empty. This is the only way I can pass the test, otherwise I get 40 instead of the required 41. I haven't completely worked out the details yet.