Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. wram_chunk_loop:
  2. ldr r8,=0x400404c @\
  3. add r8,r10 @ memorize old mapping
  4. ldrb r9,[r8] @memorize old @ and map to ARM9
  5. mov r0,#0x80 @
  6. strb r0,[r8] @map as 1st arm9 slot @/
  7. mov r1,#0x3000000 @\
  8. ldr r0,[nop] @
  9.  
  10. fill_loop: @ fill chunk with NOPs
  11. str r0,[r1],#4 @
  12. tst r1,#0x8000 @
  13. beq fill_loop @/
  14. ldr r4,=ldr_bx_dd_arm7_re_entry @\
  15. ldmia r4!,{r0-r3} @ cast hook at chunk end
  16. ldr r4,=0x3007ff0 @
  17. stmia r4!,{r0-r3} @/
  18. strb r9,[r8] @restore old @-map back to ARM7
  19. sub r10,#1 @\
  20. and r10,#7 @ next chunk
  21. cmp r10,#6 @
  22. bne wram_chunk_loop @/
  23. bx lr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement