summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrChat <arkolbed@gmail.com>2018-02-17 10:33:34 -0600
committerDrChat <arkolbed@gmail.com>2018-02-17 10:33:34 -0600
commit705fd7594abc905021a0e4a9e54fc85e8074a5dd (patch)
treea3d5fe619f8d4b9e2d3d589997f4f7bfe931e442
parent3d1c2a6c9a5c9e67d17024928fe309aa7fe11ddd (diff)
[Docs] Add more notes on the single-page offset
-rw-r--r--docs/cpu.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/cpu.md b/docs/cpu.md
index ed9708136..d89722182 100644
--- a/docs/cpu.md
+++ b/docs/cpu.md
@@ -95,7 +95,18 @@ i.e. virtual 0xA0000000 == physical 0x00000000
Unfortunately, the 0xE0000000-0xFFFFFFFF range is unused in Xenia because
it maps to physical memory with a single page offset, which is impossible
-to do under the Win32 API.
+to do under the Win32 API. We can't fake this either, as this offset is
+built into games - see the following sequence:
+
+```
+srwi r9, r10, 20 # r9 = r10 >> 20
+clrlwi r10, r10, 3 # r10 = r10 & 0x1FFFFFFF (physical address)
+addi r11, r9, 0x200
+rlwinm r11, r11, 0,19,19 # r11 = r11 & 0x1000
+add r11, r11, r10 # add 1 page to addresses > 0xE0000000
+
+# r11 = addess passed to GPU
+```
## Memory Management