Title says it all really. Some documentation claims that the
Z flags are affected by both
TSX, just as with all other transfer commands. Other documentation suggests that neither
TSX affect the flags.
But this emulator, fake6502 affects the flags with
TSX and not with
TXS. As fake6502 was made for a NES emulator, could this change be specific to the Ricoh variants? If it's just a bug, then it is worth noting that there is At least one other emulator that behaves this way. I found the source code of perfect6502 too obtuse to read and understand.
I can see how this could be missed in the emulators because I imagine very little code will depend on this. Probably just code that initialises various registers and will overwrite the status flags anyway. Also, I can see how this mistake could be missed in the documentation, the Transfer instructions are all very similar.
I'd be interested if there's any variation in this matter between the various incarnations of the 6502 also.