PLA, PLX, PLY fail to update flags
ziplantil opened this issue · 0 comments
ziplantil commented
PLA, PLX and PLY should update both the N and Z flags according to the popped value (see Table 6-4 on the datasheet for example: https://www.westerndesigncenter.com/wdc/documentation/w65c02s.pdf; besides the datasheet, this is a well documented behaviour). This same behavior also applies to NMOS 6502 on PLA. The emulator currently fails to update the flags.
Proposed fix: pla, plx and ply in instructions.rs should call self.nz_p(self.a)
(and for X, Y, respectively) on their last line.