Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST is supposed to set negative flag as well #3

Open
harbaum opened this issue Jul 16, 2019 · 1 comment
Open

TST is supposed to set negative flag as well #3

harbaum opened this issue Jul 16, 2019 · 1 comment

Comments

@harbaum
Copy link

harbaum commented Jul 16, 2019

The TST instruction is supposed to set the Zero and the Negative flag. This one here only sets zero which makes the atari st ikbd rom mouse reporting fail as this test:

fb39	96 c9		ldaa c9				;$C9 Mouse mode
...
fb3f	4d		tsta			
fb40	2a 1a		bpl  1a (FB5C)	

always fails and the branch is taken even if the value read from $c9 is negative.

This can be fixed by changing https://github.com/thasega/HD63701/blob/master/HD63701_EXEC.v#L147 to

`mcTST: rC   <= {rC[5:4],CC[3:2],rC[1:0]};
@harbaum
Copy link
Author

harbaum commented Jul 16, 2019

This has also been fixed in https://github.com/harbaum/ikbd

@harbaum harbaum changed the title TST sets negative flag TST is supposed to set negative flag as well Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant