Advertisement
SerityW

Untitled

Nov 26th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. 02/56A7: 7B TDC
  2. 02/56A8: AA TAX
  3. 02/56A9: A9 FF LDA #$FF -- loads 255
  4. 02/56AB: 20 7C 00 JSR $007C -- rand number between 0 and A (255 in this case)
  5. 02/56AE: 85 0E STA $0E -- store random number
  6. 02/56B0: A5 3D LDA $3D
  7. 02/56B2: 0A ASL
  8. 02/56B3: AA TAX
  9. 02/56B4: C2 20 REP #$20
  10. 02/56B6: BD 20 40 LDA $4020,x -- enemy id
  11. 02/56B9: 20 B7 01 JSR $01B7 -- x4 i think
  12. 02/56BC: AA TAX
  13. 02/56BD: 7B TDC
  14. 02/56BE: E2 20 SEP #$20
  15. 02/56C0: A4 3D LDY $3D
  16. 02/56C2: BF 03 50 D0 LDA $D05003,x -- pull 'always drop'
  17. 02/56C6: F0 0C BEQ $56D4 -- if there's no match ('eq'ual to 0x00) then jump to 56DF
  18. 02/56C8: C9 80 CMP #$80 -- compare to 0x80 (item 128, the divider between weapons/armor)
  19. 02/56CA: F0 08 BEQ $56D4 -- if it's 0x80, jump to 56DF since 80 is a blank item
  20. 02/56CC: C9 FF CMP #$FF -- compare to 0xFF (unused item)
  21. 02/56CE: F0 04 BEQ $56D4 -- if it's 0xFF jump to 56DF since FF is not a real item
  22. 02/56D0: 99 66 7C STA $7C66,y -- store the drop
  23. 02/56D3: 60 RTS -- get outta here
  24.  
  25. 02/56D4: A5 0E LDA $0E -- 56DF; loads the random number from earlier
  26. 02/56D6: C9 10 CMP #$10 -- if it's over 0x10 (16) then get out
  27. 02/56D8: B0 11 BCS $56EB
  28. 02/56DA: BF 02 50 D0 LDA $D05002,x -- load rare drop
  29. 02/56DE: F0 0B BEQ $56EB -- same stuff as before, if no item or 0x80 or 0xff then get out
  30. 02/56E0: C9 80 CMP #$80
  31. 02/56E2: F0 07 BEQ $56EB
  32. 02/56E4: C9 FF CMP #$FF
  33. 02/56E6: F0 03 BEQ $56EB
  34. 02/56E8: 99 66 7C STA $7C66,y -- store drop
  35. 02/56EB: 60 RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement