Advertisement
Guest User

Untitled

a guest
Feb 24th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.84 KB | None | 0 0
  1.  
  2. Only the new code will be noted here:
  3.  
  4. (This next loop sees if our current command is one that needs special code to assess
  5. its menu availability -- graying it if unavailable -- or another property, such as
  6. its aiming. If so, a special function is called for the command.)
  7.  
  8. C2/52C6: A2 07 00 LDX #$0008
  9. C2/52C9: DF E9 52 C2 CMP $C264CC,X (does our current command match one whose menu
  10. availability or aiming can vary?)
  11. C2/52CD: D0 08 BNE $52D7 (if not, compare it to next command in table)
  12. C2/52CF: 8A TXA
  13. C2/52D0: 0A ASL
  14. C2/52D1: AA TAX
  15. C2/52D2: FC F1 52 JSR ($64D5,X) (call special function for command)
  16. C2/52D5: 80 04 BRA $52DB (we've gotten a match, so there's no need to
  17. compare our current command against rest of list)
  18. C2/52D7: CA DEX
  19. C2/52D8: 10 EF BPL $52C9 (there are 8 possible commands that need
  20. special checks)
  21.  
  22.  
  23. (This next loop sees if our current command is one that needs special code to assess
  24. its menu availability -- blanking it if unavailable -- or do some other tests. If so,
  25. a special function is called for the command.)
  26.  
  27. C2/53C9: A3 01 LDA $01,S (get current command)
  28. C2/53CB: A2 05 LDX #$06
  29. C2/53CD: DF 68 54 C2 CMP $C264B7,X (is it one of the commands that can be blanked from menu
  30. or have other miscellaneous crap done?)
  31. C2/53D1: D0 08 BNE $53DB (branch if not)
  32. C2/53D3: 8A TXA
  33. C2/53D4: 0A ASL
  34. C2/53D5: AA TAX (X = X * 2)
  35. C2/53D6: FC 5C 54 JSR ($64BE,X) (call special function for command)
  36. C2/53D9: 80 03 BRA $53DE (we've gotten a match, so there's no need to
  37. compare our current command against rest of list)
  38. C2/53DB: CA DEX
  39. C2/53DC: 10 EF BPL $53CD (there are 6 possible commands that need
  40. special checks)
  41.  
  42. Data: Command comparison
  43. C2/64B7: 03 (Morph)
  44. C2/64B8: 11 (Leap)
  45. C2/64B9: 13 (Dance)
  46. C2/64BA: 02 (Magic)
  47. C2/64BB: 17 (X-Magic)
  48. C2/64BC: 0C (Lore)
  49. C2/64BD: 19 (Summon)
  50.  
  51. Data: Jump table!
  52. C2/64BE: 0B54
  53. C2/64C0: 3E54
  54. C2/64C2: 3954
  55. C2/64C4: 2954
  56. C2/64C6: 2954
  57. C2/64C8: 4554
  58. C2/64CA: 2D54
  59.  
  60. Data: Command comparison
  61. C2/64CC: 03 (Morph)
  62. C2/64CD: 0B (Runic)
  63. C2/64CE: 07 (SwdTech)
  64. C2/64CF: 0C (Lore)
  65. C2/64D0: 17 (X-Magic)
  66. C2/64D1: 02 (Magic)
  67. C2/64D2: 19 (Summon)
  68. C2/64D3: 06 (Capture)
  69. C2/64D4: 00 (Fight)
  70.  
  71. Data: Jump table!
  72. C2/64D5: 2653
  73. C2/64D7: 2253
  74. C2/64D9: 1D53
  75. C2/64DB: 1453
  76. C2/64DD: 1453
  77. C2/64DF: 1453
  78. C2/64E1: 1453
  79. C2/64E3: 0153
  80. C2/64E5: 0153
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement