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.

55 lines
1.0 KiB

6 years ago
  1. #.set noat # allow manual use of $at
  2. .set noreorder # don't insert nops after branches
  3. .set gp=64
  4. .include "macros.inc"
  5. #this file is probably handwritten
  6. .section .text, "ax"
  7. glabel bzero
  8. blt $a1, 0xc, .L803236BC
  9. negu $v1, $a0
  10. andi $v1, $v1, 3
  11. beqz $v1, .L80323660
  12. subu $a1, $a1, $v1
  13. swl $zero, ($a0)
  14. addu $a0, $a0, $v1
  15. .L80323660:
  16. and $a3, $a1, -32
  17. beqz $a3, .L8032369C
  18. subu $a1, $a1, $a3
  19. addu $a3, $a3, $a0
  20. .L80323674:
  21. addiu $a0, $a0, 0x20
  22. sw $zero, -0x20($a0)
  23. sw $zero, -0x1c($a0)
  24. sw $zero, -0x18($a0)
  25. sw $zero, -0x14($a0)
  26. sw $zero, -0x10($a0)
  27. sw $zero, -0xc($a0)
  28. sw $zero, -8($a0)
  29. bne $a0, $a3, .L80323674
  30. sw $zero, -4($a0)
  31. .L8032369C:
  32. and $a3, $a1, -4
  33. beqz $a3, .L803236BC
  34. subu $a1, $a1, $a3
  35. addu $a3, $a3, $a0
  36. .L803236B0:
  37. addiu $a0, $a0, 4
  38. bne $a0, $a3, .L803236B0
  39. sw $zero, -4($a0)
  40. .L803236BC:
  41. blez $a1, .L803236D4
  42. nop
  43. addu $a1, $a1, $a0
  44. .L803236C8:
  45. addiu $a0, $a0, 1
  46. bne $a0, $a1, .L803236C8
  47. sb $zero, -1($a0)
  48. .L803236D4:
  49. jr $ra