add xbox patch support

This commit is contained in:
Martin Michelsen
2024-01-21 21:56:48 -08:00
parent db3cecdd2b
commit 80a57f9d3e
147 changed files with 584 additions and 198 deletions
@@ -0,0 +1,20 @@
# This code flushes the data cache and invalidates the instruction cache for a
# block of newly-written code in memory.
# Arguments:
# r3 = address of written code
# r4 = number of bytes
# Returns: nothing
# Overwrites: r3, r4, r5
lis r5, 0xFFFF
ori r5, r5, 0xFFF1
and r5, r5, r3
subf r3, r5, r3
add r4, r4, r3
flush_cached_code_writes__again:
dcbst r0, r5
sync
icbi r0, r5
addic r5, r5, 8
subic. r4, r4, 8
bge flush_cached_code_writes__again
isync