Advertisement
Doesnt

FE7 reverse source

Mar 16th, 2017
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. .thumb
  2. # To enable all difficulties:
  3. # put 1F 20 70 47 at x9E9FC
  4.  
  5. # org x28FBA
  6. .org 0xA
  7. ldr r0, MethodAddr
  8. bx r0
  9.  
  10. .align 2
  11. MethodAddr: .word 0x09000001
  12.  
  13.  
  14. .org 0x40
  15. # check that the attacker is not red
  16. # and check that the defender is red
  17. ldr r0, AttackerAddr
  18. ldr r1, DefenderAddr
  19. ldrb r0, [r0, #0xB]
  20. ldrb r1, [r1, #0xB]
  21. mov r2, #0x80
  22. and r0, r2
  23. and r1, r2
  24. cmp r0, #0x0
  25. bne Abort
  26. cmp r1, #0x80
  27. bne Abort
  28.  
  29. # check that the defending red unit is armed
  30. # a unit not being armed is the game's signal not to counter
  31. ldr r0, DefenderAddr
  32. mov r1, #0x48
  33. ldrh r0, [r0, r1]
  34. cmp r0, #0x0
  35. beq Abort
  36.  
  37. # reverse turn order here
  38. mov r0, r13
  39. mov r1, r4
  40. ldr r2, DefenderAddr
  41. str r2, [r0]
  42. ldr r0, AttackerAddr
  43. str r0, [r1]
  44. b Return
  45.  
  46. Abort:
  47. mov r0, r13
  48. mov r1, r4
  49. ldr r2, AttackerAddr
  50. str r2, [r0]
  51. ldr r0, DefenderAddr
  52. str r0, [r1]
  53.  
  54. Return:
  55. ldr r0, ReturnAddr
  56. bx r0
  57.  
  58. .align 2
  59. AttackerAddr: .word 0x0203A3F0
  60. DefenderAddr: .word 0x0203A470
  61. ReturnAddr: .word 0x08028FC5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement