Advertisement
Guest User

QB VWF .asm script for armips

a guest
Nov 8th, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. ; Final Fantasy 7 Spirit Fix written by Gemini
  2. ; This file serves as a simple example for how to
  3. ; use the assembler for changing code
  4.  
  5.  
  6. .psx ; Set the architecture to PSX
  7. .open "EBOOT.BIN",0x8804054 ; Open SLPS_010.57 for output.
  8. ; 0x8000F800 will be used as the
  9. ; header size
  10.  
  11. .org 0x894be60 ; here, a branch to the new code is
  12. ; added
  13. vwf_start:
  14.  
  15. lhu a3, 0x0(s4)
  16. li s6,0x894c060
  17. ; swc1 f21,0x0(s6)
  18. move v1, s6
  19. addi v1, v1, 0x10
  20. vwf_loop:
  21. lhu v0, 0x0(v1)
  22. beq v0, zero, vwf_stop
  23. nop
  24. bnel v0, a3, vwf_loop
  25. addiu v1, v1, 0x4
  26. vwf_hit:
  27. lbu v0, v1(0x3)
  28. lwc1 f21, v0
  29. cvt.s.w f21, f21
  30. vwf_stop:
  31. add.s f25, f25, f21
  32. addiu s4, s4, 0x2
  33. li v0, 0x0
  34. li v1, 0x0
  35. li a3, 0x0
  36. li s6, 0x0
  37. j injection_return
  38.  
  39. .org 0x8833A80 ; Some new code
  40.  
  41. injection_code:
  42.  
  43. j vwf_start
  44. nop
  45. injection_return:
  46.  
  47.  
  48. ; the rest of the file will remain
  49. ; unchanged
  50.  
  51. .close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement