Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2015
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // It starts by comparing $0451 to #$05
  2. 006A5  A2 LDX #$05
  3. 006A7  EC CPX $0451
  4. // If they are not equal, it runs a subroutine
  5. 006AA  F0 BEQ $006AF
  6.  
  7. 006AC  20 JSR $ED88
  8.  
  9. // Store a 0 to $3F
  10. 006AF  A9 LDA #$00
  11. 006B1  85 STA $3F
  12.  
  13. // Pull a value from ram
  14. 006B3  A5 LDA $FC
  15. // Compare it to #$02
  16. 006B5  C9 CMP #$02
  17. // If not equal, exit
  18. 006B7  D0 BNE $006CD
  19.  
  20. // Call a subroutine with Y set to #$0F
  21. 006B9  A0 LDY #$0F
  22. 006BB  20 JSR $AF7F
  23.  
  24. // The subroutine must set or clear the carry flag as it's output. If it is set, exit
  25. 006BE  B0 BCS $006CD
  26.  
  27. // Pull another value from ram
  28. 006C0  A5 LDA $D4
  29. // If it is not 0, exit
  30. 006C2  D0 BNE $006CD
  31.  
  32. // Pull another value from ram
  33. 006C4  AD LDA $0568
  34. // Clear carry, and add #$10 to it
  35. 006C7  18 CLC
  36. 006C8  69 ADC #$10
  37. // And store it back
  38. 006CA  8D STA $0568
  39.  
  40. //Exit
  41. 006CD  4C JMP $B535
  42.  
  43. // I need to check if the rest of this code is every actually used
  44. // It seems as though $B535 is the exit point for all this code, so I am going to break up the code based on that
  45. 006D0  A0 LDY #$00
  46. 006D2  20 JSR $88B6
  47. 006D5  4C JMP $B535
  48.  
  49. 006D8  A0 LDY #$01
  50. 006DA  20 JSR $88B6
  51. 006DD  8A TXA
  52. 006DE  F0 BEQ $00700
  53. 006E0  A0 LDY #$02
  54. 006E2  DD CMP $03A0,X *
  55. 006E5  20 JSR $88B6
  56. 006E8  AD LDA $0558
  57. 006EB  C9 CMP #$F0
  58. 006ED  90 BCC $00700
  59. 006EF  A2 LDX #$12
  60. 006F1  BD LDA $B98B,X *
  61. 006F4  9D STA $0157,X
  62. 006F7  CA DEX
  63. 006F8  10 BPL $006F1
  64. 006FA  20 JSR $8952
  65. 006FD  4C JMP $81EE
  66. 00700  A5 LDA $48
  67. 00702  29 AND #$07
  68. 00704  D0 BNE $00712
  69. // This section swaps the values in $010A and $010B. Why? I have no idea. But it does.
  70. 00706  AD LDA $010B
  71. 00709  AE LDX $010A
  72. 0070C  8E STX $010B
  73. 0070F  8D STA $010A
  74. 00712  4C JMP $B535
  75.  
  76. // These two bytes (that just happen to equal "CMP #$2F") are checksum values, and should never be used
  77. 00715  C9 CMP #$2D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement