PHP/PLP flag setting possibly buggy
I have now run a 6502 instruction test suite on my Acorn Atom simulator which uses code from this repo.
I found problems with the value returned by the PLP instruction, and got very confused as 0 was pushed with PHP and 0 was popped with PLP, but the testsuite expected $30. Search the 6502.org forum there are various postings about this, suggesting that the missing bit always returns '1' when PLP is executed, but PLP also returns '1' for the break bit, regardless of what was pushed, except in the case of hardware interrupts.
I modified PLP to set the Break and missing bit and the testsuite then ran fully.
This is probably a very low impact bug, and perhaps the author might want to do more research and consider a code change?
Thanks for reporting. However, the inaccuracies you mention here and in the previous issues were corrected time ago. I am updating the project and will upload the new code ~~shortly~~ soon.