Super Mario 64s source code (from a leak on 4chan so be careful)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
711 B

6 years ago
  1. .set noreorder # don't insert nops after branches
  2. .set gp=64
  3. .include "macros.inc"
  4. .section .text, "ax"
  5. glabel osWritebackDCache
  6. blez $a1, .osWritebackDCacheReturn
  7. nop
  8. li $t3, 8192
  9. bgeu $a1, $t3, .L80324E40
  10. nop
  11. move $t0, $a0
  12. addu $t1, $a0, $a1
  13. bgeu $t0, $t1, .osWritebackDCacheReturn
  14. nop
  15. andi $t2, $t0, 0xf
  16. addiu $t1, $t1, -0x10
  17. subu $t0, $t0, $t2
  18. .L80324E28:
  19. cache 0x19, ($t0)
  20. bltu $t0, $t1, .L80324E28
  21. addiu $t0, $t0, 0x10
  22. .osWritebackDCacheReturn:
  23. jr $ra
  24. nop
  25. .L80324E40:
  26. lui $t0, 0x8000
  27. addu $t1, $t0, $t3
  28. addiu $t1, $t1, -0x10
  29. .L80324E4C:
  30. cache 1, ($t0)
  31. bltu $t0, $t1, .L80324E4C
  32. addiu $t0, 0x10 # addiu $t0, $t0, 0x10
  33. jr $ra
  34. nop