Advertisement
Chdata

Untitled

Apr 7th, 2014
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. Most likely to cause crashes due to being overwritten.
  2. STA $xxxx
  3.  
  4. Why this specifically? Register addresses like $2100 (Screen Display Register) are stored to this way.
  5. Pretty much all the registers are generally a bad idea to overwrite.
  6. For the most basic protection against ruining these is to look for STA $xxxx / STA $xxxx,x / STA $xxxx,y and whether or not any of the registers are being written to.
  7.  
  8. Also remember that STA $4200 would translate to XX 00 42 due to endianess.
  9.  
  10. http://wiki.superfamicom.org/snes/show/Registers
  11.  
  12. Some complicated stuff like STA ($xx) or STA [$xx] may be an issue but you probably won't be able to tell if those write to registers so you may as well handle them separately.
  13.  
  14. The following are also capable of directly overwriting values in ram addresses:
  15.  
  16. Every other STA.
  17. TSB
  18. TRB
  19. ASL $xx (ASL A is completely safe to change as it doesn't specifically change the value of a ram address -- only the accumulator)
  20. LSR
  21. ROR
  22. ROL
  23. MVP
  24. MVN
  25.  
  26. But are more likely to be safe to overwrite and should be its own option.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement